1 description("This tests that setting window event listeners on the frameset, sets them on the window.");
5 if (window.GCController)
6 return GCController.collect();
8 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
9 var s = new String("");
13 var frameSet = document.createElement("frameset");
14 var func = function() { }
16 frameSet.onblur = func;
17 shouldBe("window.onblur", "func");
18 shouldBe("window.onblur", "frameSet.onblur");
20 frameSet.onfocus = func;
21 shouldBe("window.onfocus", "func");
22 shouldBe("window.onfocus", "frameSet.onfocus");
24 frameSet.onerror = func;
25 shouldBe("window.onerror", "func");
26 shouldBe("window.onerror", "frameSet.onerror");
28 frameSet.onload = func;
29 shouldBe("window.onload", "func");
30 shouldBe("window.onload", "frameSet.onload");
32 frameSet.onbeforeunload = func;
33 shouldBe("window.onbeforeunload", "func");
34 shouldBe("window.onbeforeunload", "frameSet.onbeforeunload");
36 frameSet.onhashchange = func;
37 shouldBe("window.onhashchange", "func");
38 shouldBe("window.onhashchange", "frameSet.onhashchange");
40 frameSet.onmessage = func;
41 shouldBe("window.onmessage", "func");
42 shouldBe("window.onmessage", "frameSet.onmessage");
44 frameSet.onoffline = func;
45 shouldBe("window.onoffline", "func");
46 shouldBe("window.onoffline", "frameSet.onoffline");
48 frameSet.ononline = func;
49 shouldBe("window.ononline", "func");
50 shouldBe("window.ononline", "frameSet.ononline");
52 frameSet.onresize = func;
53 shouldBe("window.onresize", "func");
54 shouldBe("window.onresize", "frameSet.onresize");
56 frameSet.onstorage = func;
57 shouldBe("window.onstorage", "func");
58 shouldBe("window.onstorage", "frameSet.onstorage");
60 frameSet.onunload = func;
61 shouldBe("window.onunload", "func");
62 shouldBe("window.onunload", "frameSet.onunload");
63 window.onunload = null;