7 <script src="../../resources/js-test-pre.js"></script>
14 if (window.testRunner)
15 testRunner.waitUntilDone();
17 description("Tests that detaching a frame with a wheel event handlers doesn't crash.");
24 var frame = document.createElement('iframe');
25 frame.addEventListener('load', function() {
27 shouldBe("internals.wheelEventHandlerCount()", "0");
30 window.setTimeout(checkFrameRemoved, 0);
33 frame.src = 'resources/wheel-event-handler-on-document.html';
34 addFrameToDocument(frame);
37 function checkFrameRemoved()
42 shouldBe("internals.wheelEventHandlerCount()", "0");
44 if (++loadCount == maxLoads) {
45 isSuccessfullyParsed();
46 if (window.testRunner)
47 testRunner.notifyDone();
52 window.setTimeout(makeFrame, 0);
55 function addFrameToDocument(frame)
57 document.body.appendChild(frame);