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

Side by Side 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: Add layout test 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/frame/LocalDOMWindow.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/LocalDOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698