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

Unified Diff: third_party/WebKit/Source/web/tests/RootScrollerTest.cpp

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: third_party/WebKit/Source/web/tests/RootScrollerTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/RootScrollerTest.cpp b/third_party/WebKit/Source/web/tests/RootScrollerTest.cpp
index 8d52a0a12ec53d4948d4e4e8ef46bffe7aaee572..c9a830e50be4b62b9d58a5145a69ab7bf5c8d78d 100644
--- a/third_party/WebKit/Source/web/tests/RootScrollerTest.cpp
+++ b/third_party/WebKit/Source/web/tests/RootScrollerTest.cpp
@@ -221,11 +221,12 @@ TEST_F(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
@@ -267,7 +268,8 @@ TEST_F(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());
@@ -278,7 +280,8 @@ TEST_F(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());
@@ -296,7 +299,8 @@ TEST_F(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());

Powered by Google App Engine
This is Rietveld 408576698