https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 14e4db9c6a7a36f87541fafceab253725397f807 authored by Aryeh Gregor on 16 August 2016, 18:17:28 UTC
Correctly test initEvent unsetting propagation flags
Tip revision: 14e4db9
open-url-bogus.htm
<!DOCTYPE html>
<html>
  <head>
    <title>XMLHttpRequest: open() - bogus URLs</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[7] following::ol/li[8]" />
  </head>
  <body>
    <div id="log"></div>
    <script>
      function url(url) {
        test(function() {
          var client = new XMLHttpRequest()
          assert_throws("SyntaxError", function() { client.open("GET", url) })
        }, document.title + " (" + url + ")")
      }
      url("//[")
      url("ftp:")
      url("http://a a/")
      url("http:////////////")
      url("http://u:p@/")
    </script>
  </body>
</html>
back to top