7 <script src="../../resources/js-test-pre.js"></script>
14 if (window.testRunner)
15 testRunner.waitUntilDone();
17 description("Tests that detaching and reattaching a frame with a wheel event handlers doesn't crash.");
25 frame = document.createElement('iframe');
26 frame.addEventListener('load', function() {
28 shouldBe("internals.wheelEventHandlerCount()", "0");
31 window.setTimeout(checkFrameRemoved, 0);
34 frame.src = 'resources/wheel-event-handlers-dynamic.html';
35 addFrameToDocument(frame);
38 function checkFrameRemoved()
43 shouldBe("internals.wheelEventHandlerCount()", "0");
45 if (++loadCount == maxLoads) {
46 isSuccessfullyParsed();
47 if (window.testRunner)
48 testRunner.notifyDone();
53 window.setTimeout(function() {
54 addFrameToDocument(frame);
58 function addFrameToDocument(frame)
60 document.body.appendChild(frame);