https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 617fbe23dc89c0e48f443e4d3a6e918d7bdc3022 authored by Anne van Kesteren on 28 September 2016, 13:24:58 UTC
WIP
Tip revision: 617fbe2
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