Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(748)

Unified Diff: LayoutTests/fast/dom/Window/post-message-to-self.html

Issue 1148133005: Window.postMessage() to self can cause document leaks (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase to master Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/post-message-to-self-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d95ea1e28d16a87ca89c2491fcfaa69612b3dc2b
--- /dev/null
+++ b/LayoutTests/fast/dom/Window/post-message-to-self.html
@@ -0,0 +1,31 @@
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description("Test that window.postMessage() to self is not leaking.");
+
+window.jsTestIsAsync = true;
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+function postMessageToSelf() {
+ setInterval(function() {
+ window.postMessage("msg", "*");
+ }, 1);
+}
+
+function receiveMessage(event) {
+ testPassed("Received message " + event.data);
+ finishJSTest();
+}
+
+window.addEventListener("message", receiveMessage, false);
+postMessageToSelf();
+</script>
+</body>
+</html
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/post-message-to-self-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698