[GTK][WPE] Fix non-unified builds after r250857
[WebKit-https.git] / LayoutTests / fast / events / form-iframe-target-before-load-crash2.html
1 <html>\r
2     <script src="../../resources/js-test-pre.js"></script>\r
3     <body onload="runTest()">\r
4         <div id="console"></div>\r
5         <form id="form1" style="display:none" target="test" action="about:blank"></form>\r
6         <script>\r
7             if (window.testRunner)\r
8             {\r
9                 testRunner.dumpAsText();\r
10                 testRunner.waitUntilDone();\r
11             }\r
12         \r
13             function runTest()\r
14             {\r
15                 document.getElementById('form1').submit();\r
16                 \r
17                 if (window.testRunner)\r
18                     testRunner.notifyDone();\r
19                 document.getElementById('console').innerHTML = 'PASS';\r
20             }\r
21 \r
22             count = 0;\r
23             document.addEventListener("beforeload", function(event) {\r
24                 event.preventDefault();\r
25                 count = count + 1;\r
26                 if (count == 2)\r
27                 {\r
28                     document.body.removeChild(document.getElementById('test'));\r
29                     gc();\r
30                     document.body.offsetTop;\r
31                 }\r
32             }, true);\r
33        </script>\r
34        <iframe id="test" name="test" src="about:blank"></iframe>\r
35    </body>\r
36 </html>\r
37 \r