OLD | NEW |
(Empty) | |
| 1 <!-- |
| 2 if (location.hash == '#1') { |
| 3 onconnect = function(e) { |
| 4 var port = e.ports[0]; |
| 5 var w2 = new Worker('#2'); |
| 6 w2.onmessage = function(e) { |
| 7 port.postMessage('1'+e.data); |
| 8 } |
| 9 } |
| 10 } else if (location.hash == '#2') { |
| 11 var w3 = new SharedWorker('006-1.js'); |
| 12 w3.port.onmessage = function(e) { |
| 13 postMessage('2'+e.data); |
| 14 } |
| 15 } |
| 16 |
| 17 /* |
| 18 --> |
| 19 <!doctype html> |
| 20 <title>shared worker in dedicated worker in shared worker</title> |
| 21 <script src="/resources/testharness.js"></script> |
| 22 <script src="/resources/testharnessreport.js"></script> |
| 23 <div id=log></div> |
| 24 <script> |
| 25 async_test(function() { |
| 26 var w1 = new SharedWorker('#1'); |
| 27 w1.port.onmessage = this.step_func(function(e) { |
| 28 assert_equals(e.data, '123'); |
| 29 this.done(); |
| 30 }); |
| 31 }); |
| 32 </script> |
| 33 <!-- |
| 34 */ |
| 35 //--> |
OLD | NEW |