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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Window/HTMLFrameSetElement-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 frameset, set s them on the window."); 9 description("This tests that setting window event listeners on the frameset, set s them 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 frameSet = document.createElement("frameset"); 11 var frameSet = document.createElement("frameset");
21 var func = function() { } 12 var func = function() { }
22 13
23 frameSet.onblur = func; 14 frameSet.onblur = func;
24 shouldBe("window.onblur", "func"); 15 shouldBe("window.onblur", "func");
25 shouldBe("window.onblur", "frameSet.onblur"); 16 shouldBe("window.onblur", "frameSet.onblur");
26 17
27 frameSet.onfocus = func; 18 frameSet.onfocus = func;
28 shouldBe("window.onfocus", "func"); 19 shouldBe("window.onfocus", "func");
29 shouldBe("window.onfocus", "frameSet.onfocus"); 20 shouldBe("window.onfocus", "frameSet.onfocus");
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 61
71 frameSet.onunload = func; 62 frameSet.onunload = func;
72 shouldBe("window.onunload", "func"); 63 shouldBe("window.onunload", "func");
73 shouldBe("window.onunload", "frameSet.onunload"); 64 shouldBe("window.onunload", "frameSet.onunload");
74 window.onunload = null; 65 window.onunload = null;
75 66
76 gc(); 67 gc();
77 </script> 68 </script>
78 </body> 69 </body>
79 </html> 70 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698