blob: 263e7b6db7eb1581028bad1c742627d597e90540 [file] [log] [blame]
Andrew Top61a84952019-04-30 15:07:33 -07001<!DOCTYPE html>
2<html>
3 <head>
4 <title>XMLHttpRequest: open() - bogus methods</title>
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[4]" />
8 </head>
9 <body>
10 <div id="log"></div>
11 <script>
12 function method(method) {
13 test(function() {
14 var client = new XMLHttpRequest()
15 assert_throws("SyntaxError", function() { client.open(method, "...") })
16 }, document.title + " (" + method + ")")
17 }
18 method("")
19 method(">")
20 method(" GET")
21 method("G T")
22 method("@GET")
23 method("G:ET")
24 method("GET?")
25 method("GET\n")
26 </script>
27 </body>
28</html>