open-url-worker-simple.htm (841B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8" /> 5 <title>XMLHttpRequest: relative URLs in worker scripts resolved by script URL</title> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::OL[1]/LI[3] following::OL[1]/LI[3]/ol[1]/li[1]" /> 9 </head> 10 <body> 11 <div id="log"></div> 12 <script type="text/javascript"> 13 var test = async_test() 14 var worker = new Worker("resources/workerxhr-simple.js") 15 worker.onmessage = function (e) { 16 test.step(function(){ 17 assert_equals(e.data, 'PASSED') 18 test.done() 19 }) 20 } 21 worker.postMessage('start') 22 </script> 23 </body> 24 </html>