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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/workers/shared-worker-event-listener.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 SharedWorker event listener. Should print a series of PASS messages, fol lowed with DONE.</p> 2 <p>Test SharedWorker event listener. Should print a series of PASS messages, fol lowed with DONE.</p>
3 <div id=result></div> 3 <div id=result></div>
4 <script src="../../resources/gc.js"></script>
4 <script> 5 <script>
5 function log(message) 6 function log(message)
6 { 7 {
7 document.getElementById("result").innerHTML += message + "<br>"; 8 document.getElementById("result").innerHTML += message + "<br>";
8 } 9 }
9 10
10 if (window.testRunner) { 11 if (window.testRunner) {
11 testRunner.dumpAsText(); 12 testRunner.dumpAsText();
12 testRunner.waitUntilDone(); 13 testRunner.waitUntilDone();
13 } 14 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 52
52 log("DONE"); 53 log("DONE");
53 if (window.testRunner) 54 if (window.testRunner)
54 testRunner.notifyDone(); 55 testRunner.notifyDone();
55 56
56 function createNewListener(func) 57 function createNewListener(func)
57 { 58 {
58 return function(event) { func(event); }; 59 return function(event) { func(event); };
59 } 60 }
60 61
61 function gc()
62 {
63 if (window.GCController)
64 return GCController.collect();
65
66 for (var i = 0; i < 10000; i++) { // force garbage collection (FF requires a bout 9K allocations before a collect).
67 var s = new String("abc");
68 }
69 }
70
71
72 </script> 62 </script>
73 </body> 63 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698