| OLD | NEW |
| (Empty) |
| 1 <script> | |
| 2 var childWindow; | |
| 3 </script> | |
| 4 This test makes sure that closing a window with a video element that has a poste
r image doesn't crash (radar 10576732 and https://bugs.webkit.org/show_bug.cgi?i
d=74533)<br> | |
| 5 If it doesn't crash, it passes.<br> | |
| 6 <button id="button" onclick="childWindow = window.open('resources/video-with-pos
ter-as-object-fallback.html')"> | |
| 7 Click here to open test window | |
| 8 </button><br> | |
| 9 <div id="result"></div><br> | |
| 10 | |
| 11 <script> | |
| 12 if (window.testRunner) { | |
| 13 testRunner.dumpAsText(); | |
| 14 testRunner.waitUntilDone(); | |
| 15 testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1); | |
| 16 testRunner.overridePreference("WebKitPageCacheSupportsPluginsPreferenceKey",
1); | |
| 17 testRunner.setCanOpenWindows(true); | |
| 18 testRunner.setCloseRemainingWindowsWhenComplete(true); | |
| 19 var button = document.getElementById("button"); | |
| 20 eventSender.mouseMoveTo(button.offsetParent.offsetLeft + button.offsetLeft +
button.offsetWidth / 2, button.offsetParent.offsetTop + button.offsetTop + but
ton.offsetHeight / 2); | |
| 21 eventSender.mouseDown(); | |
| 22 eventSender.mouseUp(); | |
| 23 } | |
| 24 | |
| 25 function childLoaded() | |
| 26 { | |
| 27 childWindow.close(); | |
| 28 setTimeout("checkClosed()", 0); | |
| 29 } | |
| 30 | |
| 31 function checkClosed() | |
| 32 { | |
| 33 if (childWindow.closed) { | |
| 34 document.getElementById("result").innerText = "Closed the window without
crashing!"; | |
| 35 if (window.testRunner) | |
| 36 setTimeout("testRunner.notifyDone();", 0); | |
| 37 } | |
| 38 setTimeout("checkClosed()", 0); | |
| 39 } | |
| 40 | |
| 41 </script> | |
| OLD | NEW |