Chromium Code Reviews| 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 44a11cafdbf434a005549de2e0decd01f2d87895..4657f0f14a371bb5ee01a005b77e074bbd3c3f19 100644 |
| --- a/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc |
| +++ b/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc |
| @@ -247,14 +247,16 @@ class MockDragMouseTarget : public MockMoveGestureTarget { |
| EXPECT_EQ(mouse_event.button, WebMouseEvent::Button::Left); |
| EXPECT_EQ(mouse_event.clickCount, 1); |
| EXPECT_EQ(mouse_event.type(), WebInputEvent::MouseDown); |
| - start_.SetPoint(mouse_event.x, mouse_event.y); |
| + start_.SetPoint(mouse_event.positionInWidget().x, |
| + mouse_event.positionInWidget().y); |
| last_mouse_point_ = start_; |
| started_ = true; |
| } else { |
| EXPECT_EQ(mouse_event.button, WebMouseEvent::Button::Left); |
| ASSERT_NE(mouse_event.type(), WebInputEvent::MouseDown); |
| - gfx::PointF mouse_point(mouse_event.x, mouse_event.y); |
| + gfx::PointF mouse_point(mouse_event.positionInWidget().x, |
|
dtapuska
2017/03/31 14:04:18
I think this can be mouse_event.poisitionInWidget(
mustaq
2017/03/31 15:50:31
Done.
|
| + mouse_event.positionInWidget().y); |
| gfx::Vector2dF delta = mouse_point - last_mouse_point_; |
| total_abs_move_distance_length_ += delta.Length(); |
| if (mouse_event.type() == WebInputEvent::MouseUp) |
| @@ -490,7 +492,8 @@ class MockSyntheticTapMouseTarget : public MockSyntheticTapGestureTarget { |
| EXPECT_EQ(mouse_event.type(), WebInputEvent::MouseDown); |
| EXPECT_EQ(mouse_event.button, WebMouseEvent::Button::Left); |
| EXPECT_EQ(mouse_event.clickCount, 1); |
| - position_ = gfx::PointF(mouse_event.x, mouse_event.y); |
| + position_ = gfx::PointF(mouse_event.positionInWidget().x, |
| + mouse_event.positionInWidget().y); |
| start_time_ = base::TimeDelta::FromMilliseconds( |
| static_cast<int64_t>(mouse_event.timeStampSeconds() * 1000)); |
| state_ = STARTED; |
| @@ -499,7 +502,8 @@ class MockSyntheticTapMouseTarget : public MockSyntheticTapGestureTarget { |
| EXPECT_EQ(mouse_event.type(), WebInputEvent::MouseUp); |
| EXPECT_EQ(mouse_event.button, WebMouseEvent::Button::Left); |
| EXPECT_EQ(mouse_event.clickCount, 1); |
| - EXPECT_EQ(position_, gfx::PointF(mouse_event.x, mouse_event.y)); |
| + EXPECT_EQ(position_, gfx::PointF(mouse_event.positionInWidget().x, |
| + mouse_event.positionInWidget().y)); |
| stop_time_ = base::TimeDelta::FromMilliseconds( |
| static_cast<int64_t>(mouse_event.timeStampSeconds() * 1000)); |
| state_ = FINISHED; |
| @@ -609,7 +613,8 @@ class MockSyntheticPointerMouseActionTarget |
| ASSERT_TRUE(WebInputEvent::isMouseEventType(event.type())); |
| const WebMouseEvent& mouse_event = static_cast<const WebMouseEvent&>(event); |
| type_ = mouse_event.type(); |
| - position_ = gfx::PointF(mouse_event.x, mouse_event.y); |
| + position_ = gfx::PointF(mouse_event.positionInWidget().x, |
| + mouse_event.positionInWidget().y); |
| clickCount_ = mouse_event.clickCount; |
| button_ = mouse_event.button; |
| num_actions_dispatched_++; |