| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script type="text/javascript"> | |
| 4 if (window.testRunner) { | |
| 5 testRunner.dumpAsText(); | |
| 6 testRunner.setCanOpenWindows(); | |
| 7 testRunner.waitUntilDone(); | |
| 8 } | |
| 9 | |
| 10 var newWindow = window.open("data:text/html,Hello world!") | |
| 11 | |
| 12 function tryCloseWindow(w) { | |
| 13 if (!w) | |
| 14 return; | |
| 15 | |
| 16 w.close(); | |
| 17 | |
| 18 function doneIfClosed() { | |
| 19 if (w.closed) { | |
| 20 if (window.testRunner) | |
| 21 testRunner.notifyDone(); | |
| 22 return; | |
| 23 } | |
| 24 setTimeout(doneIfClosed, 1); | |
| 25 }; | |
| 26 doneIfClosed(); | |
| 27 } | |
| 28 | |
| 29 window.onload = function() { | |
| 30 tryCloseWindow(newWindow); | |
| 31 | |
| 32 var testPlugin = document.getElementById('testPlugin'); | |
| 33 if (!testPlugin || !testPlugin.parentNode) | |
| 34 document.documentElement.appendChild(document.createTextNode("SUCCES
S")); | |
| 35 } | |
| 36 </script> | |
| 37 </head> | |
| 38 <body> | |
| 39 <p>This tests a plugin that removes itself from the document during NPP_New.
It passes if it does not crash during removal (<a href="rdar://problem/6954546
"><rdar://problem/6954546></a>) or when a window is next closed (<a href="
rdar://problem/7090444"><rdar://problem/7090444></a>).</p> | |
| 40 <object id="testPlugin" type="application/x-webkit-test-netscape" width="200
" height="200" cleardocumentduringnew>fallback content</object> | |
| 41 </body> | |
| 42 </html> | |
| OLD | NEW |