blob: 4e20e4a23a3cf89b6e7a82c29929990b959b295a [file] [log] [blame]
<html>
<head>
<style>
body {
height: 2000px;
}
</style>
<script>
function mouseWheelFired(e) {
if (e.wheelDelta == 0)
document.getElementById('log').textContent = "FAIL. We got a wheel event with a delta of 0.";
if (window.eventSender)
testRunner.notifyDone();
}
function scrollTest()
{
eventSender.mouseMoveTo(20, 20);
eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'changed', 'none');
eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'continue');
eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
}
function loaded()
{
document.body.addEventListener('mousewheel', mouseWheelFired, false);
if (window.eventSender) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
setTimeout(scrollTest, 0);
}
}
window.addEventListener('load', loaded, false);
</script>
</head>
<body>
<!--To run this test outside of the test harness, just manually scroll and ensure that the success message
does not change to a failure message.-->
<pre id="log">Success! We didn't get a wheel event with a delta of 0.</pre>
</body>
</html>