OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../../resources/js-test.js"></script> |
| 4 </head> |
| 5 <body> |
| 6 <script> |
| 7 description("Test that window.postMessage() to self is not leaking."); |
| 8 |
| 9 window.jsTestIsAsync = true; |
| 10 |
| 11 if (window.testRunner) { |
| 12 testRunner.dumpAsText(); |
| 13 testRunner.waitUntilDone(); |
| 14 } |
| 15 |
| 16 function postMessageToSelf() { |
| 17 setInterval(function() { |
| 18 window.postMessage("msg", "*"); |
| 19 }, 1); |
| 20 } |
| 21 |
| 22 function receiveMessage(event) { |
| 23 testPassed("Received message " + event.data); |
| 24 finishJSTest(); |
| 25 } |
| 26 |
| 27 window.addEventListener("message", receiveMessage, false); |
| 28 postMessageToSelf(); |
| 29 </script> |
| 30 </body> |
| 31 </html |
OLD | NEW |