Index: LayoutTests/fast/events/wheelevent-in-scrolling-div.html |
diff --git a/LayoutTests/fast/events/wheelevent-in-scrolling-div.html b/LayoutTests/fast/events/wheelevent-in-scrolling-div.html |
index e0cacc3e4b08f4a34f2d6fae9ab5cb0a75dfad27..2b935fb13333a8bebbe0f4ad393467220c6066ed 100644 |
--- a/LayoutTests/fast/events/wheelevent-in-scrolling-div.html |
+++ b/LayoutTests/fast/events/wheelevent-in-scrolling-div.html |
@@ -16,16 +16,9 @@ |
if (overflowElement) { |
overflowElement.addEventListener("mousewheel", mousewheelHandler, false); |
- var deltaX = window.expectedScrollLeft; |
- var deltaY = window.expectedScrollTop; |
- var eventInit = { |
- deltaX: deltaX, |
- deltaY: deltaY, |
- wheelDeltaX: -120 * deltaX, |
- wheelDeltaY: -120 * deltaY, |
- }; |
- var event = new WheelEvent("mousewheel", eventInit); |
- overflowElement.dispatchEvent(event); |
+ // EventSender uses 40px per tick. |
+ eventSender.mouseMoveTo(overflowElement.offsetLeft + 5, overflowElement.offsetTop + 5); |
+ eventSender.mouseScrollBy(-2.5, -5); |
} |
setTimeout('checkOffsets();', 100); |
@@ -46,13 +39,13 @@ |
event = e; |
shouldBe("event.deltaY", "window.expectedScrollTop"); |
shouldBe("event.deltaX", "window.expectedScrollLeft"); |
- shouldBe("event.wheelDeltaY", "window.expectedScrollTop*-120"); |
- shouldBe("event.wheelDeltaX", "window.expectedScrollLeft*-120"); |
+ shouldBe("event.wheelDeltaY", "-5*120"); |
+ shouldBe("event.wheelDeltaX", "-2.5*120"); |
if (e.wheelDeltaY) |
- shouldBe("event.wheelDelta", "window.expectedScrollTop*-120"); |
+ shouldBe("event.wheelDelta", "-5*120"); |
else |
- shouldBe("event.wheelDelta", "window.expectedScrollLeft*-120"); |
+ shouldBe("event.wheelDelta", "-2.5*120"); |
} |
</script> |
</head> |