Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Window / post-message-to-self.html
blobd95ea1e28d16a87ca89c2491fcfaa69612b3dc2b
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.");
9 window.jsTestIsAsync = true;
11 if (window.testRunner) {
12 testRunner.dumpAsText();
13 testRunner.waitUntilDone();
16 function postMessageToSelf() {
17 setInterval(function() {
18 window.postMessage("msg", "*");
19 }, 1);
22 function receiveMessage(event) {
23 testPassed("Received message " + event.data);
24 finishJSTest();
27 window.addEventListener("message", receiveMessage, false);
28 postMessageToSelf();
29 </script>
30 </body>
31 </html