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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/message-channel-listener-circular-ownership.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 a leak is not created by assigning a MessagePort to a property of i ts own listener.</p> 2 <p>Test that a leak is not created by assigning a MessagePort to a property of i ts own listener.</p>
3 <p>Only works with run-webkit-tests --leaks.</p> 3 <p>Only works with run-webkit-tests --leaks.</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 if (window.testRunner) 8 if (window.testRunner)
17 testRunner.dumpAsText(); 9 testRunner.dumpAsText();
18 10
19 var channel = new MessageChannel; 11 var channel = new MessageChannel;
20 12
21 channel.port1.onclose = function() {} 13 channel.port1.onclose = function() {}
22 14
23 channel.port1.onclose.foo = channel; 15 channel.port1.onclose.foo = channel;
24 channel.port1.onclose.bar = channel.port1; 16 channel.port1.onclose.bar = channel.port1;
25 channel.port1.onclose.baz = channel.port2; 17 channel.port1.onclose.baz = channel.port2;
26 18
27 channel = null; 19 channel = null;
28 gc(); 20 gc();
29 </script> 21 </script>
30 </body> 22 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698