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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/message-channel-gc-3.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 messages are delivered even if both ports are inaccessi ble from JS any more.</p> 2 <p>Test that MessagePort messages are delivered even if both ports are inaccessi ble from JS any more.</p>
3 <p>Should say PASS twice.</p> 3 <p>Should say PASS twice.</p>
4 <pre id=log></pre> 4 <pre id=log></pre>
5 <script src="../../resources/gc.js"></script>
5 <script> 6 <script>
6 function gc()
7 {
8 if (window.GCController)
9 return GCController.collect();
10
11 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
12 var s = new String("abc");
13 }
14 }
15 7
16 function log(message) 8 function log(message)
17 { 9 {
18 document.getElementById("log").innerHTML += message + "<br>"; 10 document.getElementById("log").innerHTML += message + "<br>";
19 } 11 }
20 12
21 if (window.testRunner) { 13 if (window.testRunner) {
22 testRunner.dumpAsText(); 14 testRunner.dumpAsText();
23 testRunner.waitUntilDone(); 15 testRunner.waitUntilDone();
24 } 16 }
(...skipping 19 matching lines...) Expand all
44 gc(); 36 gc();
45 log("PASS: port closed."); 37 log("PASS: port closed.");
46 if (window.testRunner) 38 if (window.testRunner)
47 testRunner.notifyDone(); 39 testRunner.notifyDone();
48 } 40 }
49 41
50 test1(); 42 test1();
51 43
52 </script> 44 </script>
53 </body> 45 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698