open-url-multi-window-5.htm (1030B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>XMLHttpRequest: open() resolving URLs (multi-Window; 5)</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[2]/ol[1]/li[1]" /> 8 </head> 9 <body> 10 <div id="log"></div> 11 <script> 12 var test = async_test(), 13 client, 14 exceptionCtor, 15 count = 0; 16 function init() { 17 test.step(function() { 18 if(0 == count) { 19 client = new self[0].XMLHttpRequest(); 20 exceptionCtor = self[0].DOMException; 21 count++ 22 self[0].location.reload() 23 } else if(1 == count) { 24 assert_throws_dom("InvalidStateError", exceptionCtor, function() {client.open("GET", "...") }); 25 test.done() 26 } 27 }) 28 } 29 </script> 30 <iframe src="resources/init.htm"></iframe> 31 </body> 32 </html>