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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/message-channel-gc-2.html

Issue 2847943002: Cleanup LayoutTests that define a function gc(). (Closed)
Patch Set: Fixing Layout Tests Failures Created 3 years, 7 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
OLDNEW
1 <body> 1 <body>
2 <p>Test that MessagePort close event gets delivered (without crashing) even if t he channel object is garbage collected.</p> 2 <p>Test that MessagePort close event gets delivered (without crashing) even if t he channel object is garbage collected.</p>
3 <pre id=log></pre> 3 <pre id=log></pre>
4 <script src="../../resources/gc.js"></script>
4 <script> 5 <script>
5 function gc()
6 {
7 if (window.GCController)
8 return GCController.collect();
9 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
10 var s = new String("abc");
11 }
12 }
13 6
14 function log(message) 7 function log(message)
15 { 8 {
16 document.getElementById("log").innerHTML += message + "<br>"; 9 document.getElementById("log").innerHTML += message + "<br>";
17 } 10 }
18 11
19 if (window.testRunner) { 12 if (window.testRunner) {
20 testRunner.dumpAsText(); 13 testRunner.dumpAsText();
21 testRunner.waitUntilDone(); 14 testRunner.waitUntilDone();
22 } 15 }
(...skipping 13 matching lines...) Expand all
36 log("DONE"); 29 log("DONE");
37 gc(); 30 gc();
38 if (window.testRunner) 31 if (window.testRunner)
39 testRunner.notifyDone(); 32 testRunner.notifyDone();
40 }, 0); 33 }, 0);
41 channel = new MessageChannel; 34 channel = new MessageChannel;
42 gc(); 35 gc();
43 36
44 </script> 37 </script>
45 </body> 38 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698