Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / xmlhttprequest-open-empty-method.html
blob5b61b2be62d76ebeec3ddf5c4451e0616ff279e6
1 <html>
2 <body>
3 <p>Test that open throws a SYNTAX_ERR exception when called with an empty method.</p>
4 <pre id="result">FAIL: script didn't run or raised an unexpected exception.</pre>
5 <script>
6 if (window.testRunner)
7 testRunner.dumpAsText();
9 var result = "FAIL: no exception was caught";
10 var req = new XMLHttpRequest;
11 try {
12 req.open("", "resources/print-headers.cgi", false);
13 } catch (ex) {
14 result = "SUCCESS: got exception " + ex;
16 document.getElementById("result").textContent = result;
17 </script>
18 </body>
19 </html>