| Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
|
| index fe584f144b44407b1dc08cddf14aab0ff8269082..7b6d43fb2f35b36e8d19f9a7839a20f0750382c0 100644
|
| --- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
|
| @@ -8136,6 +8136,7 @@ protected:
|
| event.windowX = windowX;
|
| event.windowY = windowY;
|
| event.canScroll = true;
|
| + event.hasPreciseScrollingDeltas = true;
|
| webViewHelper->webViewImpl()->handleInputEvent(event);
|
| }
|
|
|
| @@ -8399,6 +8400,43 @@ TEST_P(WebFrameOverscrollTest, ReportingLatestOverscrollForElasticOverscroll)
|
| Mock::VerifyAndClearExpectations(&client);
|
| }
|
|
|
| +TEST_P(WebFrameOverscrollTest, ScrollPageWithBodyExplicitlyOverflowing)
|
| +{
|
| + RuntimeEnabledFeatures::setScrollTopLeftInteropEnabled(false);
|
| +
|
| + OverscrollWebViewClient client;
|
| + registerMockedHttpURLLoad("mouse-wheel-overflow-body.html");
|
| + FrameTestHelpers::WebViewHelper webViewHelper;
|
| + webViewHelper.initializeAndLoad(m_baseURL + "mouse-wheel-overflow-body.html", true, 0, &client, configureAndroid);
|
| + webViewHelper.resize(WebSize(800, 600));
|
| +
|
| + FrameView* view = webViewHelper.webViewImpl()->mainFrameImpl()->frameView();
|
| + Document* document = toWebLocalFrameImpl(webViewHelper.webViewImpl()->mainFrame())->frame()->document();
|
| +
|
| + {
|
| + EXPECT_CALL(client, didOverscroll(_, _, _, _)).Times(0);
|
| + ScrollByWheel(&webViewHelper, 100, 100, 0, -450);
|
| +
|
| + LayoutBox* layoutBody = toLayoutBox(document->body()->layoutObject());
|
| + ASSERT_EQ(400, layoutBody->getScrollableArea()->scrollPosition().y());
|
| + ASSERT_EQ(400, layoutBody->getScrollableArea()->maximumScrollPosition().y());
|
| +
|
| + Mock::VerifyAndClearExpectations(&client);
|
| + }
|
| +
|
| + view->setScrollPosition(DoublePoint(0, 0), ProgrammaticScroll);
|
| +
|
| + {
|
| + EXPECT_CALL(client, didOverscroll(WebFloatSize(0, 200), WebFloatSize(0, 200), WebFloatPoint(), WebFloatSize()));
|
| + ScrollByWheel(&webViewHelper, 100, 100, 0, -300);
|
| +
|
| + ASSERT_EQ(100, view->getScrollableArea()->scrollPosition().y());
|
| + ASSERT_EQ(100, view->getScrollableArea()->maximumScrollPosition().y());
|
| +
|
| + Mock::VerifyAndClearExpectations(&client);
|
| + }
|
| +}
|
| +
|
| TEST_F(WebFrameTest, OrientationFrameDetach)
|
| {
|
| RuntimeEnabledFeatures::setOrientationEventEnabled(true);
|
|
|