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

Unified Diff: ui/events/blink/input_handler_proxy_unittest.cc

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: rebase Created 3 years, 5 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/blink/input_handler_proxy_unittest.cc
diff --git a/ui/events/blink/input_handler_proxy_unittest.cc b/ui/events/blink/input_handler_proxy_unittest.cc
index 7de08a08f45f962d29bd3efe0ec7b1d788dbb715..6e3fdf9bcb69634378f4a1967f61481b9cfcef4a 100644
--- a/ui/events/blink/input_handler_proxy_unittest.cc
+++ b/ui/events/blink/input_handler_proxy_unittest.cc
@@ -312,11 +312,13 @@ class MockInputHandlerProxyClient
blink::WebFloatSize(cumulative_scroll.width, cumulative_scroll.height));
}
- MOCK_METHOD4(DidOverscroll,
- void(const gfx::Vector2dF& accumulated_overscroll,
- const gfx::Vector2dF& latest_overscroll_delta,
- const gfx::Vector2dF& current_fling_velocity,
- const gfx::PointF& causal_event_viewport_point));
+ MOCK_METHOD5(
+ DidOverscroll,
+ void(const gfx::Vector2dF& accumulated_overscroll,
+ const gfx::Vector2dF& latest_overscroll_delta,
+ const gfx::Vector2dF& current_fling_velocity,
+ const gfx::PointF& causal_event_viewport_point,
+ const cc::ScrollBoundaryBehavior& scroll_boundary_behavior));
void DidStopFlinging() override {}
void DidAnimateForInput() override {}
MOCK_METHOD1(SetWhiteListedTouchAction, void(cc::TouchAction touch_action));
@@ -2225,11 +2227,10 @@ void InputHandlerProxyTest::GestureFlingStopsAtContentEdge() {
.WillOnce(testing::Return(overscroll));
EXPECT_CALL(
mock_client_,
- DidOverscroll(
- overscroll.accumulated_root_overscroll,
- overscroll.unused_scroll_delta,
- testing::Property(&gfx::Vector2dF::y, testing::Lt(0)),
- testing::_));
+ DidOverscroll(overscroll.accumulated_root_overscroll,
+ overscroll.unused_scroll_delta,
+ testing::Property(&gfx::Vector2dF::y, testing::Lt(0)),
+ testing::_, overscroll.scroll_boundary_behavior));
if (!touchpad_and_wheel_scroll_latching_enabled_)
EXPECT_CALL(mock_input_handler_, ScrollEnd(testing::_));
EXPECT_SET_NEEDS_ANIMATE_INPUT(1);
@@ -2390,11 +2391,10 @@ TEST_P(InputHandlerProxyTest, GestureFlingCancelledAfterBothAxesStopScrolling) {
.WillOnce(testing::Return(overscroll));
EXPECT_CALL(
mock_client_,
- DidOverscroll(
- overscroll.accumulated_root_overscroll,
- overscroll.unused_scroll_delta,
- testing::Property(&gfx::Vector2dF::y, testing::Lt(0)),
- testing::_));
+ DidOverscroll(overscroll.accumulated_root_overscroll,
+ overscroll.unused_scroll_delta,
+ testing::Property(&gfx::Vector2dF::y, testing::Lt(0)),
+ testing::_, overscroll.scroll_boundary_behavior));
EXPECT_SET_NEEDS_ANIMATE_INPUT(1);
time += base::TimeDelta::FromMilliseconds(10);
Animate(time);
@@ -2419,11 +2419,10 @@ TEST_P(InputHandlerProxyTest, GestureFlingCancelledAfterBothAxesStopScrolling) {
.WillOnce(testing::Return(overscroll));
EXPECT_CALL(
mock_client_,
- DidOverscroll(
- overscroll.accumulated_root_overscroll,
- overscroll.unused_scroll_delta,
- testing::Property(&gfx::Vector2dF::x, testing::Lt(0)),
- testing::_));
+ DidOverscroll(overscroll.accumulated_root_overscroll,
+ overscroll.unused_scroll_delta,
+ testing::Property(&gfx::Vector2dF::x, testing::Lt(0)),
+ testing::_, overscroll.scroll_boundary_behavior));
EXPECT_CALL(mock_input_handler_, ScrollEnd(testing::_));
time += base::TimeDelta::FromMilliseconds(10);
Animate(time);

Powered by Google App Engine
This is Rietveld 408576698