mitz@apple.com | 37aadf5 | 2011-01-13 18:21:15 +0000 | [diff] [blame] | 1 | <p> |
| 2 | Test that a plug-in that causes its Widget to be destroyed during setWindow does not cause a crash. |
| 3 | </p> |
| 4 | <embed id="plug-in" type="application/x-webkit-test-netscape" onSetWindow="handleSetWindow()"> |
| 5 | <script> |
| 6 | var plugIn = document.getElementById("plug-in"); |
| 7 | var count = 0; |
| 8 | |
rniwa@webkit.org | 5cf7fa8 | 2012-06-15 07:38:37 +0000 | [diff] [blame] | 9 | if (window.testRunner) |
| 10 | testRunner.dumpAsText(); |
mitz@apple.com | 37aadf5 | 2011-01-13 18:21:15 +0000 | [diff] [blame] | 11 | |
| 12 | function handleSetWindow() |
| 13 | { |
| 14 | count++; |
| 15 | |
| 16 | if (count == 2) |
| 17 | plugIn.style.width = "500px"; |
| 18 | else if (count == 3) |
| 19 | plugIn.parentNode.removeChild(plugIn); |
| 20 | } |
| 21 | |
| 22 | handleSetWindow(); |
| 23 | </script> |