OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script> |
| 4 if (window.layoutTestController) { |
| 5 layoutTestController.dumpAsText(); |
| 6 layoutTestController.setCanOpenWindows(); |
| 7 layoutTestController.setPopupBlockingEnabled(true); |
| 8 layoutTestController.setCloseRemainingWindowsWhenComplete(true); |
| 9 layoutTestController.waitUntilDone(); |
| 10 } |
| 11 |
| 12 function done() { |
| 13 if (window.layoutTestController) |
| 14 layoutTestController.notifyDone(); |
| 15 } |
| 16 |
| 17 function test() { |
| 18 var form = document.getElementById('form'); |
| 19 form.submit(); |
| 20 // Unfortunately, we need to give the asynchronous POST load a little time |
| 21 // to run, just in case the test is trying to fail :) |
| 22 setTimeout("done()", 100); |
| 23 } |
| 24 </script> |
| 25 </head> |
| 26 <body onload="test()"> |
| 27 If the POST pop-up was not blocked then there will be an ALERT containing a |
| 28 DOMWindow object. Otherwise, the test passes. |
| 29 <form id="form" action="data:text/html,<script>alert(window)</script>" target="_
blank"> |
| 30 <input type="submit" value="Submit"/> |
| 31 </form> |
| 32 </body> |
| 33 </html> |
OLD | NEW |