blob: d08f785d9e73c157fde524a3ba0da01eab2b214c [file] [log] [blame]
description("Tests basic use of GestureFlingStart");
var expectedWheelEventsOccurred = "2";
var actualWheelEventsOccurred = 0;
function recordWheelEvent(event)
{
shouldBe('event.clientX', "10");
shouldBe('event.clientY', "11");
// Test deliberately does not equality check wheelDeltas to not be fragile in the face of curve adjustment.
shouldBeTrue("event.wheelDeltaX > 5");
shouldBeTrue("event.wheelDeltaY > 5");
actualWheelEventsOccurred++;
}
document.addEventListener("mousewheel", recordWheelEvent);
if (window.testRunner && window.eventSender && window.eventSender.gestureFlingStart) {
eventSender.gestureFlingStart(10, 11, 1000, 1000);
testRunner.displayAndTrackRepaints();
testRunner.displayAndTrackRepaints();
testRunner.displayAndTrackRepaints();
}
setTimeout(function() {
shouldBe('actualWheelEventsOccurred', expectedWheelEventsOccurred);
}, 100);
if (window.testRunner)
testRunner.waitUntilDone();
setTimeout(function() {
isSuccessfullyParsed();
if (window.testRunner)
testRunner.notifyDone();
}, 200);