OLD | NEW |
1 <html> | 1 <html> |
| 2 <script src="../js/resources/js-test-pre.js"></script> |
2 <body onload="runTest()"> | 3 <body onload="runTest()"> |
3 <div id="console"></div> | 4 <div id="console"></div> |
4 <form id="form1" style="display:none" method="post" target="test" action
="http://anything.com"></form> | 5 <form id="form1" style="display:none" method="post" target="test" action
="http://anything.com"></form> |
5 <script> | 6 <script> |
6 if (window.layoutTestController) | 7 if (window.layoutTestController) |
7 { | 8 { |
8 layoutTestController.dumpAsText(); | 9 layoutTestController.dumpAsText(); |
9 layoutTestController.waitUntilDone(); | 10 layoutTestController.waitUntilDone(); |
10 } | 11 } |
11 | 12 |
12 function runTest() | 13 function runTest() |
13 { | 14 { |
14 document.getElementById('form1').submit(); | 15 document.getElementById('form1').submit(); |
15 | 16 |
16 if (window.layoutTestController) | 17 if (window.layoutTestController) |
17 layoutTestController.notifyDone(); | 18 layoutTestController.notifyDone(); |
18 document.getElementById('console').innerHTML = 'PASS'; | 19 document.getElementById('console').innerHTML = 'PASS'; |
19 } | 20 } |
20 | 21 |
21 count = 0; | 22 count = 0; |
22 document.addEventListener("beforeload", function(event) { | 23 document.addEventListener("beforeload", function(event) { |
23 event.preventDefault(); | 24 event.preventDefault(); |
24 count = count + 1; | 25 count = count + 1; |
25 if (count == 2) | 26 if (count == 2) |
26 { | 27 { |
27 document.body.removeChild(document.getElementById('test')); | 28 document.body.removeChild(document.getElementById('test')); |
| 29 gc(); |
28 document.body.offsetTop; | 30 document.body.offsetTop; |
29 } | 31 } |
30 }, true); | 32 }, true); |
31 </script> | 33 </script> |
32 <iframe id="test" src="about:blank"></iframe> | 34 <iframe id="test" src="about:blank"></iframe> |
33 </body> | 35 </body> |
34 </html> | 36 </html> |
35 | 37 |
OLD | NEW |