| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 var exceptions = []; | |
| 3 try { location.href = 1; } catch(e) { exceptions.push('href'); } | |
| 4 try { location.protocol = 1; } catch(e) { exceptions.push('protocol'); } | |
| 5 try { location.host = 1; } catch(e) { exceptions.push('host'); } | |
| 6 try { location.hostname = 1; } catch(e) { exceptions.push('hostname');} | |
| 7 try { location.port = 1; } catch(e) { exceptions.push('port'); } | |
| 8 try { location.pathname = 1; } catch(e) { exceptions.push('pathname'); } | |
| 9 try { location.search = 1; } catch(e) { exceptions.push('search'); } | |
| 10 try { location.hash = 1; } catch(e) { exceptions.push('hash'); } | |
| 11 | |
| 12 postMessage([null, location.href, location.protocol, location.host, | |
| 13 location.hostname, location.port, location.pathname, | |
| 14 location.search, location.hash, exceptions]); | |
| 15 /* | |
| 16 --> | |
| 17 <!doctype html> | |
| 18 <title>setting members of WorkerLocation</title> | |
| 19 <script src="/resources/testharness.js"></script> | |
| 20 <script src="/resources/testharnessreport.js"></script> | |
| 21 <div id="log"></div> | |
| 22 <script> | |
| 23 async_test(function() { | |
| 24 var worker = new Worker('#'); | |
| 25 worker.onmessage = this.step_func(function(e) { | |
| 26 assert_equals(e.data[0], null); | |
| 27 assert_equals(e.data[1], location.href + '#', 'href'); | |
| 28 assert_equals(e.data[2], location.protocol, 'protocol'); | |
| 29 assert_equals(e.data[3], location.host, 'host'); | |
| 30 assert_equals(e.data[4], location.hostname, 'hostname'); | |
| 31 assert_equals(e.data[5], location.port, 'port'); | |
| 32 assert_equals(e.data[6], location.pathname, 'pathname'); | |
| 33 assert_equals(e.data[7], location.search, 'search'); | |
| 34 assert_equals(e.data[8], '', 'hash'); | |
| 35 assert_array_equals(e.data[9], [], 'number of exceptions'); | |
| 36 this.done(); | |
| 37 }); | |
| 38 }); | |
| 39 </script> | |
| 40 <!-- | |
| 41 */ | |
| 42 //--> | |
| 43 | |
| OLD | NEW |