OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <title>cross-document channel</title> |
| 3 <script src="/resources/testharness.js"></script> |
| 4 <script src="/resources/testharnessreport.js"></script> |
| 5 <iframe src=004-1.html></iframe><iframe src=004-2.html></iframe> |
| 6 <div id="log"></div> |
| 7 <script> |
| 8 var t = async_test(); |
| 9 onload = t.step_func( |
| 10 function() { |
| 11 var channel = new MessageChannel(); |
| 12 window[0].postMessage(1, '*', [channel.port1]); |
| 13 window[1].postMessage(2, '*', [channel.port2]); |
| 14 channel = null; |
| 15 window.onmessage = t.step_func( |
| 16 function(e) { |
| 17 assert_equals(e.data, 1); |
| 18 t.done(); |
| 19 }); |
| 20 } |
| 21 ); |
| 22 </script> |
OLD | NEW |