OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <title>Ensure that javascript: document navigations are blocked during onunload.
</title> |
| 4 </head> |
| 5 <body> |
| 6 <pre id="console"></pre> |
| 7 <script> |
| 8 if (window.testRunner) { |
| 9 testRunner.dumpAsText(); |
| 10 testRunner.waitUntilDone(); |
| 11 } |
| 12 |
| 13 function log(msg) { |
| 14 document.getElementById("console").appendChild(document.createTextNode(msg +
"\n")); |
| 15 } |
| 16 |
| 17 var i = document.body.appendChild(document.createElement('iframe')); |
| 18 i.contentWindow.onunload = function() { |
| 19 i.src = "javascript:top.log('PASS: script executed');" + |
| 20 "'<script>top.log(\\'FAIL: document navigation not aborted\\');<" + |
| 21 "/script>'"; |
| 22 if (window.testRunner) |
| 23 testRunner.notifyDone(); |
| 24 } |
| 25 |
| 26 i.src = "data:text/html,test"; |
| 27 </script> |
| 28 </body> |
| 29 </html> |
OLD | NEW |