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 | |
sof
2015/06/10 14:37:25
Add
window.jsTestIsAsync = true;
if (window.test
landell
2015/06/11 07:26:05
Done.
| |
9 function postMessageToSelf() { | |
10 setInterval(function() { | |
11 window.postMessage("msg", "*"); | |
12 }, 1); | |
13 } | |
14 | |
15 function receiveMessage(event) { | |
16 testPassed("Recevied message " + event.data); | |
sof
2015/06/10 14:37:25
sp: Received
sof
2015/06/10 14:37:25
On the next line, add a call to finishJSTest();
landell
2015/06/11 07:26:05
Done.
landell
2015/06/11 07:26:05
Done.
| |
17 } | |
18 | |
19 window.addEventListener("message", receiveMessage, false); | |
20 postMessageToSelf(); | |
21 </script> | |
22 </body> | |
23 </html | |
OLD | NEW |