| testRunner.waitUntilDone(); |
| function frameLoaded(iframe) |
| iframe.contentWindow.addEventListener('wheel', function() { |
| // Removing the window during event firing causes crash. |
| window.document.body.removeChild(iframe); |
| window.setTimeout(function() { |
| var iframeTarget = document.getElementById('iframe'); |
| var iframeBounds = iframeTarget.getBoundingClientRect(); |
| eventSender.mouseMoveTo(iframeBounds.left + 10, iframeBounds.top + 10); |
| eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none'); |
| eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none'); |
| eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none'); |
| eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none'); |
| <p>This test should not crash</p> |
| <iframe id="iframe" onload="frameLoaded(this)" src="data:text/html,<body>Wheel here</body>"></iframe> |