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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/message-port-gc-closed-cloned.html

Issue 2066533003: Use asyncGC instead of GC in fast/events/message-port-gc-closed*.html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/LayoutTests/fast/events/message-port-gc-closed.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <script> 4 <script>
5 jsTestIsAsync = true; 5 jsTestIsAsync = true;
6 description("MessagePorts (and their execution contexts) should be collected by GC once close() has been called on them"); 6 description("MessagePorts (and their execution contexts) should be collected by GC once close() has been called on them");
7 function runTest() { 7 function runTest() {
8 var channel = new MessageChannel(); 8 var channel = new MessageChannel();
9 var port = channel.port1; 9 var port = channel.port1;
10 port.onmessage = function() { 10 port.onmessage = function() {
11 iframeDocGC = internals.observeGC(document.querySelector('iframe').conte ntDocument); 11 iframeDocGC = internals.observeGC(document.querySelector('iframe').conte ntDocument);
12 document.querySelector('iframe').remove(); 12 document.querySelector('iframe').remove();
13 gc(); 13 asyncGC(function() {
14 shouldBeTrue("iframeDocGC.wasCollected"); 14 shouldBeTrue("iframeDocGC.wasCollected");
15 finishJSTest(); 15 finishJSTest();
16 });
16 }; 17 };
17 window.frames[0].postMessage("connect", "*", [channel.port2]); 18 window.frames[0].postMessage("connect", "*", [channel.port2]);
18 } 19 }
19 </script> 20 </script>
20 <iframe src="resources/message-port-gc-closed-cloned-iframe.html" onload="runTes t()"></iframe> 21 <iframe src="resources/message-port-gc-closed-cloned-iframe.html" onload="runTes t()"></iframe>
21 </body> 22 </body>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/message-port-gc-closed.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698