Chromium Code Reviews| 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..e0d5c50878a5b7ccf9e982658d19569082849a7b 100644 |
| --- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp |
| +++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp |
| @@ -1544,6 +1544,18 @@ TEST_P(ParameterizedVisualViewportTest, ElementBoundsInViewportSpaceAccountsForV |
| EXPECT_SIZE_EQ(expectedBounds.size(), boundsInViewport.size()); |
| } |
| +TEST_P(ParameterizedVisualViewportTest, ElementVisibleBoundsInViewport) |
| +{ |
| + initializeWithAndroidSettings(); |
| + webViewImpl()->resize(IntSize(640, 1080)); |
| + registerMockedHttpURLLoad("viewport-select.html"); |
| + navigateTo(m_baseURL + "viewport-select.html"); |
| + |
| + webViewImpl()->setInitialFocus(false); |
| + Element* element = webViewImpl()->focusedElement(); |
| + EXPECT_FALSE(element->visibleBoundsInViewport().isEmpty()); |
|
bokan
2016/08/08 15:22:59
Please add the converse of this check above before
tkent
2016/08/09 03:17:12
Done. I improved the test scenario to make its pu
|
| +} |
| + |
| // 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) |