| Index: third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
|
| index bf4f4cd7a8e304fbc1b3e88d314a9f6d99ee7a7c..949d3e1bf55d685c1b700d3fd6f314fc2ab5c18a 100644
|
| --- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
|
| @@ -524,7 +524,8 @@ TEST_P(ParameterizedVisualViewportTest, TestFractionalScrollOffsetIsNotOverwritt
|
|
|
| FrameView& frameView = *webViewImpl()->mainFrameImpl()->frameView();
|
| frameView.layoutViewportScrollableArea()->setScrollPosition(DoublePoint(0, 10.5), ProgrammaticScroll);
|
| - webViewImpl()->applyViewportDeltas(WebFloatSize(), WebFloatSize(10, 20), WebFloatSize(), 1, 0);
|
| + frameView.layoutViewportScrollableArea()->ScrollableArea::setScrollPosition(
|
| + DoublePoint(10, 30.5), CompositorScroll);
|
|
|
| EXPECT_EQ(30.5, frameView.layoutViewportScrollableArea()->scrollPositionDouble().y());
|
|
|
| @@ -1176,37 +1177,6 @@ TEST_P(ParameterizedVisualViewportTest, ScrollIntoViewFractionalOffset)
|
| EXPECT_POINT_EQ(FloatPoint(250.5f, 100.5f), visualViewport.location());
|
| }
|
|
|
| -// Top controls can make an unscrollable page temporarily scrollable, causing
|
| -// a scroll clamp when the page is resized. Make sure this bug is fixed.
|
| -// crbug.com/437620
|
| -TEST_F(VisualViewportTest, TestResizeDoesntChangeScrollOffset)
|
| -{
|
| - RuntimeEnabledFeatures::setInertTopControlsEnabled(false);
|
| - initializeWithAndroidSettings();
|
| - webViewImpl()->resizeWithTopControls(IntSize(980, 650), 20, false);
|
| -
|
| - navigateTo("about:blank");
|
| -
|
| - VisualViewport& visualViewport = frame()->page()->frameHost().visualViewport();
|
| - FrameView& frameView = *webViewImpl()->mainFrameImpl()->frameView();
|
| -
|
| - // Outer viewport isn't scrollable
|
| - EXPECT_SIZE_EQ(IntSize(980, 650), frameView.visibleContentRect().size());
|
| -
|
| - visualViewport.setScale(2);
|
| - visualViewport.move(FloatPoint(0, 40));
|
| -
|
| - // Simulate bringing down the top controls by 20px but counterscrolling the outer viewport.
|
| - webViewImpl()->applyViewportDeltas(WebFloatSize(), WebFloatSize(0, 20), WebFloatSize(), 1, 1);
|
| -
|
| - EXPECT_EQ(20, frameView.layoutViewportScrollableArea()->scrollPosition().y());
|
| -
|
| - webViewImpl()->resizeWithTopControls(WebSize(980, 630), 20, true);
|
| -
|
| - EXPECT_EQ(0, frameView.layoutViewportScrollableArea()->scrollPosition().y());
|
| - EXPECT_EQ(60, visualViewport.location().y());
|
| -}
|
| -
|
| static IntPoint expectedMaxFrameViewScrollOffset(VisualViewport& visualViewport, FrameView& frameView)
|
| {
|
| float aspectRatio = visualViewport.visibleRect().width() / visualViewport.visibleRect().height();
|
|
|