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

Unified Diff: ui/events/x/events_x_unittest.cc

Issue 1147293002: Stop dispatching mouse move events for wheel scrolling in X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address sadrul's comments. Created 5 years, 7 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 | « ui/events/x/events_x.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/x/events_x_unittest.cc
diff --git a/ui/events/x/events_x_unittest.cc b/ui/events/x/events_x_unittest.cc
index 3631462265693687e4fb201c73e99802b950531f..53a87062720ecdd59ced03fb31091e5a50ee3192 100644
--- a/ui/events/x/events_x_unittest.cc
+++ b/ui/events/x/events_x_unittest.cc
@@ -493,4 +493,17 @@ TEST_F(EventsXTest, ImeFabricatedKeyEvents) {
}
#endif
+TEST_F(EventsXTest, IgnoresMotionEventForMouseWheelScroll) {
+ int device_id = 1;
+ std::vector<int> devices;
+ devices.push_back(device_id);
+ ui::SetUpPointerDevicesForTest(devices);
+
+ ScopedXI2Event xev;
+ xev.InitScrollEvent(device_id, 1, 2, 3, 4, 1);
+ // We shouldn't produce a mouse move event on a mouse wheel
+ // scroll. These events are only produced for some mice.
+ EXPECT_EQ(ui::ET_UNKNOWN, ui::EventTypeFromNative(xev));
+}
+
} // namespace ui
« no previous file with comments | « ui/events/x/events_x.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698