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

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: Update ScrollManager to pass the test. 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
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 8666ffdca0f906286edc55c37ae497fcc88e46eb..eacae6cc43f933cae71b0a967c6f5692e049f971 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,
@@ -2231,11 +2233,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);
@@ -2396,11 +2397,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);
@@ -2425,11 +2425,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