4 This test makes sure that closing a window with a video element that has a poster image doesn't crash (radar 10576732 and https://bugs.webkit.org/show_bug.cgi?id=74533)<br>
5 If it doesn't crash, it passes.<br>
6 <button id="button" onclick="childWindow = window.open('resources/video-with-poster-as-object-fallback.html')">
7 Click here to open test window
9 <div id="result"></div><br>
12 if (window.layoutTestController) {
13 layoutTestController.dumpAsText();
14 layoutTestController.waitUntilDone();
15 layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
16 layoutTestController.overridePreference("WebKitPageCacheSupportsPluginsPreferenceKey", 1);
17 layoutTestController.setCanOpenWindows(true);
18 layoutTestController.setCloseRemainingWindowsWhenComplete(true);
19 var button = document.getElementById("button");
20 eventSender.mouseMoveTo(button.offsetParent.offsetLeft + button.offsetLeft + button.offsetWidth / 2, button.offsetParent.offsetTop + button.offsetTop + button.offsetHeight / 2);
21 eventSender.mouseDown();
22 eventSender.mouseUp();
25 function childLoaded()
28 setTimeout("checkClosed()", 0);
31 function checkClosed()
33 if (childWindow.closed) {
34 document.getElementById("result").innerText = "Closed the window without crashing!";
35 if (window.layoutTestController)
36 setTimeout("layoutTestController.notifyDone();", 0);
38 setTimeout("checkClosed()", 0);