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

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 the test Created 3 years, 6 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 4ea540adaa92410c91e3b93bceea76949f400151..ac564896a8a7ab95cfd68edbc922f24efc37322d 100644
--- a/ui/events/blink/input_handler_proxy_unittest.cc
+++ b/ui/events/blink/input_handler_proxy_unittest.cc
@@ -309,11 +309,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 {}
@@ -2199,11 +2201,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);
@@ -2364,11 +2365,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);
@@ -2393,11 +2393,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);
« ui/android/overscroll_refresh.h ('K') | « 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