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

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

Issue 2215333002: Fix element visibility check for validation bubbles and SELECT popups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/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)

Powered by Google App Engine
This is Rietveld 408576698