blob: 0ff06e6f72ad75613692df998853c50b30f9f459 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
if (window.eventSender) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function onLoad()
{
var divTarget = document.getElementById('target');
var divTargetBounds = divTarget.getBoundingClientRect();
divTarget.addEventListener('wheel', function() {
// Removing the div during event firing causes crash.
if (divTarget.parentNode)
divTarget.parentNode.removeChild(divTarget);
window.setTimeout(function() {
if (window.testRunner)
testRunner.notifyDone();
}, 0);
});
if (!window.eventSender)
return;
eventSender.mouseMoveTo(divTargetBounds.left + 10, divTargetBounds.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');
}
</script>
</head>
<body onload="onLoad();">
<p>This test should not crash.<p>
<div id="parent" style="height: 2000px; width: 2000px;">
<div id="holder" class="scrollable_region"">
<div id="target" style='overflow-y: auto; overflow-x: hidden; max-height: 350px;'>
<div style='height:1000px'>Wheel Here.</div>
</div>
</div>
</div>
</body>
</html>