Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: LayoutTests/fast/events/wheelevent-in-scrolling-div.html

Issue 429803002: Revert of Remove WheelEvent.initWebKitWheelEvent() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/events/wheelevent-in-scrolling-div-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
« no previous file with comments | « no previous file | LayoutTests/fast/events/wheelevent-in-scrolling-div-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698