Index: content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc |
diff --git a/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc b/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc |
index 6cd372c21a063b0c737464e2e5e865899a4b884f..2c15edb769f969b6a452ce437e079e045db7b24b 100644 |
--- a/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc |
+++ b/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc |
@@ -168,8 +168,7 @@ class MockSyntheticSmoothScrollTouchTarget |
if (touch_event.type == WebInputEvent::TouchEnd) |
scroll_distance_ = |
- anchor_ - gfx::PointF(touch_event.touches[0].position.x, |
- touch_event.touches[0].position.y); |
+ anchor_ - gfx::PointF(touch_event.touches[0].position); |
} |
} |
@@ -202,10 +201,8 @@ class MockSyntheticPinchTouchTarget : public MockSyntheticGestureTarget { |
if (!started_) { |
ASSERT_EQ(touch_event.type, WebInputEvent::TouchStart); |
- start_0_ = gfx::PointF(touch_event.touches[0].position.x, |
- touch_event.touches[0].position.y); |
- start_1_ = gfx::PointF(touch_event.touches[1].position.x, |
- touch_event.touches[1].position.y); |
+ start_0_ = gfx::PointF(touch_event.touches[0].position); |
+ start_1_ = gfx::PointF(touch_event.touches[1].position); |
last_pointer_distance_ = (start_0_ - start_1_).Length(); |
started_ = true; |
@@ -213,10 +210,8 @@ class MockSyntheticPinchTouchTarget : public MockSyntheticGestureTarget { |
ASSERT_NE(touch_event.type, WebInputEvent::TouchStart); |
ASSERT_NE(touch_event.type, WebInputEvent::TouchCancel); |
- gfx::PointF current_0 = gfx::PointF(touch_event.touches[0].position.x, |
- touch_event.touches[0].position.y); |
- gfx::PointF current_1 = gfx::PointF(touch_event.touches[1].position.x, |
- touch_event.touches[1].position.y); |
+ gfx::PointF current_0 = gfx::PointF(touch_event.touches[0].position); |
+ gfx::PointF current_1 = gfx::PointF(touch_event.touches[1].position); |
total_num_pixels_covered_ = |
(current_0 - start_0_).Length() + (current_1 - start_1_).Length(); |
@@ -271,8 +266,6 @@ class MockSyntheticTapGestureTarget : public MockSyntheticGestureTarget { |
FINISHED |
}; |
- // TODO(tdresser): clean up accesses to position_ once WebTouchPoint stores |
- // its location as a WebFloatPoint. See crbug.com/336807. |
gfx::PointF position_; |
base::TimeDelta start_time_; |
base::TimeDelta stop_time_; |
@@ -293,16 +286,14 @@ class MockSyntheticTapTouchTarget : public MockSyntheticTapGestureTarget { |
switch (state_) { |
case NOT_STARTED: |
EXPECT_EQ(touch_event.type, WebInputEvent::TouchStart); |
- position_ = gfx::PointF(touch_event.touches[0].position.x, |
- touch_event.touches[0].position.y); |
+ position_ = gfx::PointF(touch_event.touches[0].position); |
start_time_ = base::TimeDelta::FromMilliseconds( |
static_cast<int64>(touch_event.timeStampSeconds * 1000)); |
state_ = STARTED; |
break; |
case STARTED: |
EXPECT_EQ(touch_event.type, WebInputEvent::TouchEnd); |
- EXPECT_EQ(position_, gfx::PointF(touch_event.touches[0].position.x, |
- touch_event.touches[0].position.y)); |
+ EXPECT_EQ(position_, gfx::PointF(touch_event.touches[0].position)); |
stop_time_ = base::TimeDelta::FromMilliseconds( |
static_cast<int64>(touch_event.timeStampSeconds * 1000)); |
state_ = FINISHED; |
@@ -329,7 +320,7 @@ class MockSyntheticTapMouseTarget : public MockSyntheticTapGestureTarget { |
EXPECT_EQ(mouse_event.type, WebInputEvent::MouseDown); |
EXPECT_EQ(mouse_event.button, WebMouseEvent::ButtonLeft); |
EXPECT_EQ(mouse_event.clickCount, 1); |
- position_ = gfx::Point(mouse_event.x, mouse_event.y); |
+ position_ = gfx::PointF(mouse_event.x, mouse_event.y); |
start_time_ = base::TimeDelta::FromMilliseconds( |
static_cast<int64>(mouse_event.timeStampSeconds * 1000)); |
state_ = STARTED; |
@@ -338,7 +329,7 @@ class MockSyntheticTapMouseTarget : public MockSyntheticTapGestureTarget { |
EXPECT_EQ(mouse_event.type, WebInputEvent::MouseUp); |
EXPECT_EQ(mouse_event.button, WebMouseEvent::ButtonLeft); |
EXPECT_EQ(mouse_event.clickCount, 1); |
- EXPECT_EQ(position_, gfx::Point(mouse_event.x, mouse_event.y)); |
+ EXPECT_EQ(position_, gfx::PointF(mouse_event.x, mouse_event.y)); |
stop_time_ = base::TimeDelta::FromMilliseconds( |
static_cast<int64>(mouse_event.timeStampSeconds * 1000)); |
state_ = FINISHED; |