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