Chromium Code Reviews| Index: LayoutTests/fast/dom/Window/post-message-to-self.html |
| diff --git a/LayoutTests/fast/dom/Window/post-message-to-self.html b/LayoutTests/fast/dom/Window/post-message-to-self.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2e2cf54032326cd39e085f6b852d6f80b7af29b5 |
| --- /dev/null |
| +++ b/LayoutTests/fast/dom/Window/post-message-to-self.html |
| @@ -0,0 +1,23 @@ |
| +<html> |
| +<head> |
| +<script src="../../../resources/js-test.js"></script> |
| +</head> |
| +<body> |
| +<script> |
| +description("Test that window.postMessage() to self is not leaking."); |
| + |
|
sof
2015/06/10 14:37:25
Add
window.jsTestIsAsync = true;
if (window.test
landell
2015/06/11 07:26:05
Done.
|
| +function postMessageToSelf() { |
| + setInterval(function() { |
| + window.postMessage("msg", "*"); |
| + }, 1); |
| +} |
| + |
| +function receiveMessage(event) { |
| + 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.
|
| +} |
| + |
| +window.addEventListener("message", receiveMessage, false); |
| +postMessageToSelf(); |
| +</script> |
| +</body> |
| +</html |