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

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, 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
« no previous file with comments | « ui/events/blink/input_handler_proxy_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 776a8c6a622bd44a991b34dcdc00a3539795680d..8ccb5e564615e7dc6c1616f00e977a52c4bc6da7 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_METHOD3(SetWhiteListedTouchAction,
@@ -2239,11 +2241,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);
@@ -2404,11 +2405,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);
@@ -2433,11 +2433,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);
« no previous file with comments | « ui/events/blink/input_handler_proxy_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698