| 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 ad5fef436ebe017e872a5a8057abe5741111ea79..cf47dc68ac6357b3affa54b9c037503cf2bde662 100644
|
| --- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
|
| @@ -1544,6 +1544,22 @@ TEST_P(ParameterizedVisualViewportTest, ElementBoundsInViewportSpaceAccountsForV
|
| EXPECT_SIZE_EQ(expectedBounds.size(), boundsInViewport.size());
|
| }
|
|
|
| +TEST_P(ParameterizedVisualViewportTest, ElementVisibleBoundsInVisualViewport)
|
| +{
|
| + initializeWithAndroidSettings();
|
| + webViewImpl()->resize(IntSize(640, 1080));
|
| + registerMockedHttpURLLoad("viewport-select.html");
|
| + navigateTo(m_baseURL + "viewport-select.html");
|
| +
|
| + ASSERT_EQ(2.0f, webViewImpl()->pageScaleFactor());
|
| + webViewImpl()->setInitialFocus(false);
|
| + Element* element = webViewImpl()->focusedElement();
|
| + EXPECT_FALSE(element->visibleBoundsInVisualViewport().isEmpty());
|
| +
|
| + webViewImpl()->setPageScaleFactor(4.0);
|
| + EXPECT_TRUE(element->visibleBoundsInVisualViewport().isEmpty());
|
| +}
|
| +
|
| // Test that the various window.scroll and document.body.scroll properties and
|
| // methods work unchanged from the pre-virtual viewport mode.
|
| TEST_P(ParameterizedVisualViewportTest, bodyAndWindowScrollPropertiesAccountForViewport)
|
|
|