members.html (869B)
1 <!doctype html> 2 <title>members of WorkerLocation</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() { 8 var worker = new Worker('members.js'); 9 worker.onmessage = this.step_func(function(e) { 10 assert_equals(e.data[0], null); 11 assert_equals(e.data[1], location.href.replace('.html', '.js'), 'href'); 12 assert_equals(e.data[2], location.protocol, 'protocol'); 13 assert_equals(e.data[3], location.host, 'host'); 14 assert_equals(e.data[4], location.hostname, 'hostname'); 15 assert_equals(e.data[5], location.port, 'port'); 16 assert_equals(e.data[6], location.pathname.replace('.html', '.js'), 'pathname'); 17 assert_equals(e.data[7], location.search, 'search'); 18 assert_equals(e.data[8], '', 'hash'); 19 this.done(); 20 }); 21 }); 22 </script>