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