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

Unified Diff: ui/events/gestures/gesture_provider_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/gesture_provider_aura_unittest.cc
diff --git a/ui/events/gestures/gesture_provider_aura_unittest.cc b/ui/events/gestures/gesture_provider_aura_unittest.cc
index 79e06a8dc95fb9d9238550310622b54e11a79eb0..b5d385ad8113676c972b86ee300c36bd891f5760 100644
--- a/ui/events/gestures/gesture_provider_aura_unittest.cc
+++ b/ui/events/gestures/gesture_provider_aura_unittest.cc
@@ -78,76 +78,58 @@ TEST_F(GestureProviderAuraTest, IgnoresIdenticalMoveEvents) {
EXPECT_TRUE(provider()->OnTouchEvent(&press1_1));
time += base::TimeDelta::FromMilliseconds(10);
- TouchEvent move0_1(ET_TOUCH_MOVED,
- gfx::PointF(10, 10),
- 0,
- kTouchId0,
- time,
- kRadiusX,
- kRadiusY,
- kAngle,
- kForce);
+ TouchEvent move0_1(ET_TOUCH_MOVED, gfx::PointF(10, 10), 0, kTouchId0, time,
+ kAngle,
+ PointerEventDetails(EventPointerType::POINTER_TYPE_TOUCH,
+ kRadiusX, kRadiusY, kForce,
+ /* tilt_x */ 0.f,
+ /* tily_t */ 0.f));
EXPECT_TRUE(provider()->OnTouchEvent(&move0_1));
- TouchEvent move1_1(ET_TOUCH_MOVED,
- gfx::PointF(100, 200),
- 0,
- kTouchId1,
- time,
- kRadiusX,
- kRadiusY,
- kAngle,
- kForce);
+ TouchEvent move1_1(ET_TOUCH_MOVED, gfx::PointF(100, 200), 0, kTouchId1, time,
+ kAngle,
+ PointerEventDetails(EventPointerType::POINTER_TYPE_TOUCH,
+ kRadiusX, kRadiusY, kForce,
+ /* tilt_x */ 0.f,
+ /* tily_t */ 0.f));
EXPECT_TRUE(provider()->OnTouchEvent(&move1_1));
time += base::TimeDelta::FromMilliseconds(10);
- TouchEvent move0_2(ET_TOUCH_MOVED,
- gfx::PointF(10, 10),
- 0,
- kTouchId0,
- time,
- kRadiusX,
- kRadiusY,
+ TouchEvent move0_2(ET_TOUCH_MOVED, gfx::PointF(10, 10), 0, kTouchId0, time,
kAngle,
- kForce);
+ PointerEventDetails(EventPointerType::POINTER_TYPE_TOUCH,
+ kRadiusX, kRadiusY, kForce,
+ /* tilt_x */ 0.f,
+ /* tily_t */ 0.f));
// Nothing has changed, so ignore the move.
EXPECT_FALSE(provider()->OnTouchEvent(&move0_2));
- TouchEvent move1_2(ET_TOUCH_MOVED,
- gfx::PointF(100, 200),
- 0,
- kTouchId1,
- time,
- kRadiusX,
- kRadiusY,
+ TouchEvent move1_2(ET_TOUCH_MOVED, gfx::PointF(100, 200), 0, kTouchId1, time,
kAngle,
- kForce);
+ PointerEventDetails(EventPointerType::POINTER_TYPE_TOUCH,
+ kRadiusX, kRadiusY, kForce,
+ /* tilt_x */ 0.f,
+ /* tily_t */ 0.f));
// Nothing has changed, so ignore the move.
EXPECT_FALSE(provider()->OnTouchEvent(&move1_2));
time += base::TimeDelta::FromMilliseconds(10);
- TouchEvent move0_3(ET_TOUCH_MOVED,
- gfx::PointF(70, 75.1f),
- 0,
- kTouchId0,
- time,
- kRadiusX,
- kRadiusY,
+ TouchEvent move0_3(ET_TOUCH_MOVED, gfx::PointF(70, 75.1f), 0, kTouchId0, time,
kAngle,
- kForce);
+ PointerEventDetails(EventPointerType::POINTER_TYPE_TOUCH,
+ kRadiusX, kRadiusY, kForce,
+ /* tilt_x */ 0.f,
+ /* tily_t */ 0.f));
// Position has changed, so don't ignore the move.
EXPECT_TRUE(provider()->OnTouchEvent(&move0_3));
time += base::TimeDelta::FromMilliseconds(10);
- TouchEvent move0_4(ET_TOUCH_MOVED,
- gfx::PointF(70, 75.1f),
- 0,
- kTouchId0,
- time,
- kRadiusX,
- kRadiusY + 1,
+ TouchEvent move0_4(ET_TOUCH_MOVED, gfx::PointF(70, 75.1f), 0, kTouchId0, time,
kAngle,
- kForce);
+ PointerEventDetails(EventPointerType::POINTER_TYPE_TOUCH,
+ kRadiusX, kRadiusY + 1, kForce,
+ /* tilt_x */ 0.f,
+ /* tily_t */ 0.f));
}
// TODO(jdduke): Test whether event marked as scroll trigger.

Powered by Google App Engine
This is Rietveld 408576698