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

Unified Diff: content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc

Issue 1716283002: Fix x/y position of gesture scroll events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_regression
Patch Set: Created 4 years, 10 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 | « content/browser/renderer_host/input/mouse_wheel_event_queue.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc
diff --git a/content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc b/content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc
index d0d010cdcbd9c984b0bd1709f75ecb438f1240d1..b98a9a7b188e6c9d38c1c5f21acaceeabdb6ed71 100644
--- a/content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc
+++ b/content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc
@@ -125,13 +125,13 @@ class MouseWheelEventQueueTest : public testing::Test,
const WebGestureEvent::ScrollUnits scroll_units =
high_precision ? WebGestureEvent::PrecisePixels
: WebGestureEvent::Pixels;
- SendMouseWheel(10, 10, 1, 1, 0, high_precision);
+ SendMouseWheel(10, 12, 1, 1, 0, high_precision);
EXPECT_EQ(0U, queued_event_count());
EXPECT_TRUE(event_in_flight());
EXPECT_EQ(1U, GetAndResetSentEventCount());
// The second mouse wheel should not be sent since one is already in queue.
- SendMouseWheel(10, 10, 5, 5, 0, high_precision);
+ SendMouseWheel(10, 12, 5, 5, 0, high_precision);
EXPECT_EQ(1U, queued_event_count());
EXPECT_TRUE(event_in_flight());
EXPECT_EQ(0U, GetAndResetSentEventCount());
@@ -147,9 +147,13 @@ class MouseWheelEventQueueTest : public testing::Test,
EXPECT_EQ(WebInputEvent::GestureScrollBegin, all_sent_events()[0].type);
EXPECT_EQ(scroll_units,
sent_gesture_events()[0].data.scrollBegin.deltaHintUnits);
+ EXPECT_EQ(10, sent_gesture_events()[0].x);
+ EXPECT_EQ(12, sent_gesture_events()[0].y);
tdresser 2016/02/22 19:58:48 Let's check globalX/globalY somewhere at least.
dtapuska 2016/02/22 20:28:46 Done.
EXPECT_EQ(WebInputEvent::GestureScrollUpdate, all_sent_events()[1].type);
EXPECT_EQ(scroll_units,
sent_gesture_events()[1].data.scrollUpdate.deltaUnits);
+ EXPECT_EQ(10, sent_gesture_events()[1].x);
+ EXPECT_EQ(12, sent_gesture_events()[1].y);
EXPECT_EQ(WebInputEvent::MouseWheel, all_sent_events()[2].type);
EXPECT_EQ(3U, GetAndResetSentEventCount());
@@ -157,6 +161,8 @@ class MouseWheelEventQueueTest : public testing::Test,
EXPECT_EQ(1U, all_sent_events().size());
EXPECT_EQ(WebInputEvent::GestureScrollEnd, all_sent_events()[0].type);
EXPECT_EQ(scroll_units, sent_gesture_events()[0].data.scrollEnd.deltaUnits);
+ EXPECT_EQ(10, sent_gesture_events()[0].x);
+ EXPECT_EQ(12, sent_gesture_events()[0].y);
}
scoped_ptr<MouseWheelEventQueue> queue_;
« no previous file with comments | « content/browser/renderer_host/input/mouse_wheel_event_queue.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698