[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.22
[framework/web/webkit-efl.git] / LayoutTests / fast / events / onload-fires-twice.html
1 <html>\r
2 <head>\r
3     <!-- any unknown element in HEAD will trigger creation of a BODY node -->\r
4     <anytag>\r
5 \r
6     <script type="text/javascript">\r
7         if (window.layoutTestController)\r
8             layoutTestController.dumpAsText()\r
9 \r
10         var count = 2;\r
11         function testDoubleLoad() {\r
12             --count;\r
13             var result = document.getElementById("result");\r
14             if (count == 1)\r
15                 result.innerHTML = "Test passed.";\r
16             else\r
17                 result.innerHTML = "Test failed (fired more than once).";\r
18         }\r
19     </script>\r
20 </head>\r
21 <body onload="testDoubleLoad()">\r
22     <p>Makes sure an inline "load" event does not fire twice. This may occur if\r
23     an inline event listener is not removed prior to being re-added in the case\r
24     of multiple body nodes in the document. You should see "Test passed" below.\r
25     </p>\r
26     <div id='result'>Test failed (never ran).</div>\r
27 </body>\r
28 </html>\r