WorkerLocation_pathname.htm (563B)
1 <!DOCTYPE html> 2 <title> WorkerLocation URL decomposition IDL attribute: pathname </title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <div id=log></div> 6 <script> 7 async_test(function(t) { 8 var worker = new Worker('./support/WorkerLocation.js'); 9 worker.onmessage = t.step_func_done(function(e) { 10 var pathname = location.pathname; 11 var expected = pathname.substring(0, pathname.lastIndexOf('/')) + '/support/WorkerLocation.js'; 12 assert_equals(e.data.pathname, expected); 13 }); 14 }); 15 </script>