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..dbd8dc2e57d4af049e7360395192ff664a56d49b 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); |
+ var wheelEvent = document.createEvent("WheelEvent"); |
+ wheelEvent.initWebKitWheelEvent(-window.expectedScrollLeft, -window.expectedScrollTop, window, 0, 0, 0, 0, false, false, false, false); |
+ overflowElement.dispatchEvent(wheelEvent); |
} |
setTimeout('checkOffsets();', 100); |
@@ -44,8 +37,6 @@ |
function mousewheelHandler(e) |
{ |
event = e; |
- shouldBe("event.deltaY", "window.expectedScrollTop"); |
- shouldBe("event.deltaX", "window.expectedScrollLeft"); |
shouldBe("event.wheelDeltaY", "window.expectedScrollTop*-120"); |
shouldBe("event.wheelDeltaX", "window.expectedScrollLeft*-120"); |