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