| <script src="../../resources/js-test-pre.js"></script> |
| testRunner.waitUntilDone(); |
| description("Tests that detaching and reattaching a frame with a wheel event handlers doesn't crash."); |
| frame = document.createElement('iframe'); |
| frame.addEventListener('load', function() { |
| shouldBe("internals.wheelEventHandlerCount()", "0"); |
| window.setTimeout(checkFrameRemoved, 0); |
| frame.src = 'resources/wheel-event-handler-on-document.html'; |
| addFrameToDocument(frame); |
| function checkFrameRemoved() |
| shouldBe("internals.wheelEventHandlerCount()", "0"); |
| if (++loadCount == maxLoads) { |
| window.setTimeout(function() { |
| addFrameToDocument(frame); |
| function addFrameToDocument(frame) |
| document.body.appendChild(frame); |