open-url-multi-window.htm (1041B)
1 <!doctype html> 2 <html> 3 <head> 4 <title>XMLHttpRequest: open() resolving URLs (multi-Window; 1)</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[2] following::ol[1]/li[7] following::ol[1]/li[14]/ul/li[2]" /> 8 </head> 9 <body> 10 <div id="log"></div> 11 <script> 12 var test = async_test() 13 function init() { 14 test.step(function() { 15 var client = new self[0].XMLHttpRequest() 16 client.onreadystatechange = function() { 17 test.step(function() { 18 if(client.readyState == 4) { 19 assert_equals(client.responseText, "bottom\n") 20 test.done() 21 } 22 }) 23 } 24 client.open("GET", "folder.txt") 25 client.send("") 26 }) 27 } 28 </script> 29 <iframe src="resources/init.htm"></iframe> 30 </body> 31 </html>