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

Unified Diff: ui/events/test/event_generator.cc

Issue 2287403002: Create MouseWheelEvent directly instead of through MouseEvent. (Closed)
Patch Set: test Created 4 years, 4 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/event_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/test/event_generator.cc
diff --git a/ui/events/test/event_generator.cc b/ui/events/test/event_generator.cc
index 1eb461fe73ad85b77dce1c6f30f8e63d5570a65b..e308463ed606e1f5873676f5ce415b476d033ae4 100644
--- a/ui/events/test/event_generator.cc
+++ b/ui/events/test/event_generator.cc
@@ -166,9 +166,8 @@ void EventGenerator::ReleaseRightButton() {
void EventGenerator::MoveMouseWheel(int delta_x, int delta_y) {
gfx::Point location = GetLocationInCurrentRoot();
- ui::MouseEvent mouseev(ui::ET_MOUSEWHEEL, location, location,
- ui::EventTimeForNow(), flags_, 0);
- ui::MouseWheelEvent wheelev(mouseev, delta_x, delta_y);
+ ui::MouseWheelEvent wheelev(gfx::Vector2d(delta_x, delta_y), location,
+ location, ui::EventTimeForNow(), flags_, 0);
Dispatch(&wheelev);
}
« no previous file with comments | « ui/events/event_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698