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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/RootScrollerTest.cpp

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
Index: third_party/WebKit/Source/core/page/scrolling/RootScrollerTest.cpp
diff --git a/third_party/WebKit/Source/core/page/scrolling/RootScrollerTest.cpp b/third_party/WebKit/Source/core/page/scrolling/RootScrollerTest.cpp
index 3fb263fa0eaafcd12122e017677522e07bc8ac50..512064bd3eb0548ddccc98fc9b134d77bc01dbb6 100644
--- a/third_party/WebKit/Source/core/page/scrolling/RootScrollerTest.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/RootScrollerTest.cpp
@@ -230,11 +230,12 @@ TEST_P(RootScrollerTest, defaultEffectiveRootScrollerIsDocumentNode) {
class OverscrollTestWebViewClient : public FrameTestHelpers::TestWebViewClient {
public:
- MOCK_METHOD4(DidOverscroll,
+ MOCK_METHOD5(DidOverscroll,
void(const WebFloatSize&,
const WebFloatSize&,
const WebFloatPoint&,
- const WebFloatSize&));
+ const WebFloatSize&,
+ const WebScrollBoundaryBehavior&));
};
// Tests that setting an element as the root scroller causes it to control url
@@ -276,7 +277,8 @@ TEST_P(RootScrollerTest, TestSetRootScroller) {
// Scroll 50 pixels past the end. Ensure we report the 50 pixels as
// overscroll.
EXPECT_CALL(client, DidOverscroll(WebFloatSize(0, 50), WebFloatSize(0, 50),
- WebFloatPoint(100, 100), WebFloatSize()));
+ WebFloatPoint(100, 100), WebFloatSize(),
+ WebScrollBoundaryBehavior()));
GetWebView()->HandleInputEvent(GenerateTouchGestureEvent(
WebInputEvent::kGestureScrollUpdate, 0, -500));
EXPECT_FLOAT_EQ(maximum_scroll, container->scrollTop());
@@ -287,7 +289,8 @@ TEST_P(RootScrollerTest, TestSetRootScroller) {
{
// Continue the gesture overscroll.
EXPECT_CALL(client, DidOverscroll(WebFloatSize(0, 20), WebFloatSize(0, 70),
- WebFloatPoint(100, 100), WebFloatSize()));
+ WebFloatPoint(100, 100), WebFloatSize(),
+ WebScrollBoundaryBehavior()));
GetWebView()->HandleInputEvent(
GenerateTouchGestureEvent(WebInputEvent::kGestureScrollUpdate, 0, -20));
EXPECT_FLOAT_EQ(maximum_scroll, container->scrollTop());
@@ -305,7 +308,8 @@ TEST_P(RootScrollerTest, TestSetRootScroller) {
GenerateTouchGestureEvent(WebInputEvent::kGestureScrollBegin));
EXPECT_CALL(client, DidOverscroll(WebFloatSize(0, 30), WebFloatSize(0, 30),
- WebFloatPoint(100, 100), WebFloatSize()));
+ WebFloatPoint(100, 100), WebFloatSize(),
+ WebScrollBoundaryBehavior()));
GetWebView()->HandleInputEvent(
GenerateTouchGestureEvent(WebInputEvent::kGestureScrollUpdate, 0, -30));
EXPECT_FLOAT_EQ(maximum_scroll, container->scrollTop());
« no previous file with comments | « third_party/WebKit/Source/core/page/scrolling/OverscrollController.cpp ('k') | third_party/WebKit/public/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698