tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / dom / Window / script-tests / HTMLFrameSetElement-window-eventListener-attributes.js
1 description("This tests that setting window event listeners on the frameset, sets them on the window.");
2
3 function gc()
4 {
5     if (window.GCController)
6         return GCController.collect();
7
8     for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
9         var s = new String("");
10     }
11 }
12
13 var frameSet = document.createElement("frameset");
14 var func = function() { }
15
16 frameSet.onblur = func;
17 shouldBe("window.onblur", "func");
18 shouldBe("window.onblur", "frameSet.onblur");
19
20 frameSet.onfocus = func;
21 shouldBe("window.onfocus", "func");
22 shouldBe("window.onfocus", "frameSet.onfocus");
23
24 frameSet.onerror = func;
25 shouldBe("window.onerror", "func");
26 shouldBe("window.onerror", "frameSet.onerror");
27
28 frameSet.onload = func;
29 shouldBe("window.onload", "func");
30 shouldBe("window.onload", "frameSet.onload");
31
32 frameSet.onbeforeunload = func;
33 shouldBe("window.onbeforeunload", "func");
34 shouldBe("window.onbeforeunload", "frameSet.onbeforeunload");
35
36 frameSet.onhashchange = func;
37 shouldBe("window.onhashchange", "func");
38 shouldBe("window.onhashchange", "frameSet.onhashchange");
39
40 frameSet.onmessage = func;
41 shouldBe("window.onmessage", "func");
42 shouldBe("window.onmessage", "frameSet.onmessage");
43
44 frameSet.onoffline = func;
45 shouldBe("window.onoffline", "func");
46 shouldBe("window.onoffline", "frameSet.onoffline");
47
48 frameSet.ononline = func;
49 shouldBe("window.ononline", "func");
50 shouldBe("window.ononline", "frameSet.ononline");
51
52 frameSet.onresize = func;
53 shouldBe("window.onresize", "func");
54 shouldBe("window.onresize", "frameSet.onresize");
55
56 frameSet.onstorage = func;
57 shouldBe("window.onstorage", "func");
58 shouldBe("window.onstorage", "frameSet.onstorage");
59
60 frameSet.onunload = func;
61 shouldBe("window.onunload", "func");
62 shouldBe("window.onunload", "frameSet.onunload");
63 window.onunload = null;
64
65 gc();