diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-24 12:15:48 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 13:30:04 +0000 |
commit | b014812705fc80bff0a5c120dfcef88f349816dc (patch) | |
tree | 25a2e2d9fa285f1add86aa333389a839f81a39ae /chromium/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc | |
parent | 9f4560b1027ae06fdb497023cdcaf91b8511fa74 (diff) | |
download | qtwebengine-chromium-b014812705fc80bff0a5c120dfcef88f349816dc.tar.gz |
BASELINE: Update Chromium to 68.0.3440.125
Change-Id: I23f19369e01f688e496f5bf179abb521ad73874f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc')
-rw-r--r-- | chromium/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/chromium/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc b/chromium/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc index 544b8944583..33c478a33f8 100644 --- a/chromium/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc +++ b/chromium/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc @@ -151,6 +151,7 @@ class MockSyntheticGestureTarget : public SyntheticGestureTarget { } float GetTouchSlopInDips() const override { return kTouchSlopInDips; } + float GetSpanSlopInDips() const override { return 2 * kTouchSlopInDips; } int GetMouseWheelMinimumGranularity() const override { return kMouseWheelTickMultiplier; @@ -340,10 +341,10 @@ class MockSyntheticTouchscreenPinchTouchTarget switch (zoom_direction_) { case ZOOM_IN: return last_pointer_distance_ / - (initial_pointer_distance_ + 2 * GetTouchSlopInDips()); + (initial_pointer_distance_ + GetSpanSlopInDips()); case ZOOM_OUT: return last_pointer_distance_ / - (initial_pointer_distance_ - 2 * GetTouchSlopInDips()); + (initial_pointer_distance_ - GetSpanSlopInDips()); case ZOOM_DIRECTION_UNKNOWN: return 1.0f; default: @@ -465,16 +466,14 @@ class MockSyntheticTapTouchTarget : public MockSyntheticTapGestureTarget { case NOT_STARTED: EXPECT_EQ(touch_event.GetType(), WebInputEvent::kTouchStart); position_ = gfx::PointF(touch_event.touches[0].PositionInWidget()); - start_time_ = base::TimeDelta::FromMilliseconds( - static_cast<int64_t>(touch_event.TimeStampSeconds() * 1000)); + start_time_ = touch_event.TimeStamp().since_origin(); state_ = STARTED; break; case STARTED: EXPECT_EQ(touch_event.GetType(), WebInputEvent::kTouchEnd); EXPECT_EQ(position_, gfx::PointF(touch_event.touches[0].PositionInWidget())); - stop_time_ = base::TimeDelta::FromMilliseconds( - static_cast<int64_t>(touch_event.TimeStampSeconds() * 1000)); + stop_time_ = touch_event.TimeStamp().since_origin(); state_ = FINISHED; break; case FINISHED: @@ -499,8 +498,7 @@ class MockSyntheticTapMouseTarget : public MockSyntheticTapGestureTarget { EXPECT_EQ(mouse_event.button, WebMouseEvent::Button::kLeft); EXPECT_EQ(mouse_event.click_count, 1); position_ = gfx::PointF(mouse_event.PositionInWidget()); - start_time_ = base::TimeDelta::FromMilliseconds( - static_cast<int64_t>(mouse_event.TimeStampSeconds() * 1000)); + start_time_ = mouse_event.TimeStamp().since_origin(); state_ = STARTED; break; case STARTED: @@ -508,8 +506,7 @@ class MockSyntheticTapMouseTarget : public MockSyntheticTapGestureTarget { EXPECT_EQ(mouse_event.button, WebMouseEvent::Button::kLeft); EXPECT_EQ(mouse_event.click_count, 1); EXPECT_EQ(position_, gfx::PointF(mouse_event.PositionInWidget())); - stop_time_ = base::TimeDelta::FromMilliseconds( - static_cast<int64_t>(mouse_event.TimeStampSeconds() * 1000)); + stop_time_ = mouse_event.TimeStamp().since_origin(); state_ = FINISHED; break; case FINISHED: |