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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Window/HTMLBodyElement-window-eventListener-attributes.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 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="../../../resources/gc.js"></script>
5 </head> 6 </head>
6 <body> 7 <body>
7 <script> 8 <script>
8 description("This tests that setting window event listeners on the body, sets th em on the window."); 9 description("This tests that setting window event listeners on the body, sets th em on the window.");
9 10
10 function gc()
11 {
12 if (window.GCController)
13 return GCController.collect();
14
15 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
16 var s = new String("");
17 }
18 }
19
20 var func = function() { } 11 var func = function() { }
21 12
22 document.body.onblur = func; 13 document.body.onblur = func;
23 shouldBe("window.onblur", "func"); 14 shouldBe("window.onblur", "func");
24 shouldBe("window.onblur", "document.body.onblur"); 15 shouldBe("window.onblur", "document.body.onblur");
25 16
26 document.body.onfocus = func; 17 document.body.onfocus = func;
27 shouldBe("window.onfocus", "func"); 18 shouldBe("window.onfocus", "func");
28 shouldBe("window.onfocus", "document.body.onfocus"); 19 shouldBe("window.onfocus", "document.body.onfocus");
29 20
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 60
70 document.body.onunload = func; 61 document.body.onunload = func;
71 shouldBe("window.onunload", "func"); 62 shouldBe("window.onunload", "func");
72 shouldBe("window.onunload", "document.body.onunload"); 63 shouldBe("window.onunload", "document.body.onunload");
73 window.onunload = null; 64 window.onunload = null;
74 65
75 gc(); 66 gc();
76 </script> 67 </script>
77 </body> 68 </body>
78 </html> 69 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698