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

Unified Diff: ui/events/gestures/motion_event_aura_unittest.cc

Issue 1260453006: ui: events: Add a class to hold common touch and stylus properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address build problems, add accessor and unit tests. Created 5 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
Index: ui/events/gestures/motion_event_aura_unittest.cc
diff --git a/ui/events/gestures/motion_event_aura_unittest.cc b/ui/events/gestures/motion_event_aura_unittest.cc
index 03a8dd7fff12e6c33e151fd09ea5d2d136a0a902..486eee728541849e1e13752eeaf528ed80484e75 100644
--- a/ui/events/gestures/motion_event_aura_unittest.cc
+++ b/ui/events/gestures/motion_event_aura_unittest.cc
@@ -25,15 +25,9 @@ ui::TouchEvent TouchWithPosition(ui::EventType type,
float y,
float raw_x,
float raw_y) {
- ui::TouchEvent event(type,
- gfx::PointF(x, y),
- 0,
- id,
- base::TimeDelta::FromMilliseconds(0),
- 0,
- 0,
- 0,
- 0);
+ ui::TouchEvent event(
+ type, gfx::PointF(x, y), 0, id, base::TimeDelta::FromMilliseconds(0), 0,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_TOUCH));
event.set_root_location(gfx::PointF(raw_x, raw_y));
return event;
}
@@ -44,15 +38,13 @@ ui::TouchEvent TouchWithTapParams(ui::EventType type,
float radius_y,
float rotation_angle,
float pressure) {
- ui::TouchEvent event(type,
- gfx::PointF(1, 1),
- 0,
- id,
- base::TimeDelta::FromMilliseconds(0),
- radius_x,
- radius_y,
- rotation_angle,
- pressure);
+ ui::TouchEvent event(
+ type, gfx::PointF(1, 1), 0, id, base::TimeDelta::FromMilliseconds(0),
+ rotation_angle,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_TOUCH,
+ radius_x, radius_y, pressure,
+ /* tilt_x */ 0.0f,
+ /* tilt_y */ 0.0f));
event.set_root_location(gfx::PointF(1, 1));
return event;
}

Powered by Google App Engine
This is Rietveld 408576698