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

Unified Diff: Source/web/tests/WebFrameTest.cpp

Issue 175043002: Don't ignore size updates that have a width and height == 0. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index 1523c1924311e94892cb5864f555091a7ff0c39f..017149902098048b652546d8509e595ec2692c53 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -859,6 +859,23 @@ TEST_F(WebFrameTest, DisablingFixedLayoutSizeSetsCorrectLayoutSize)
EXPECT_EQ(980, webViewHelper.webViewImpl()->mainFrameImpl()->frameView()->contentsSize().width());
}
+TEST_F(WebFrameTest, ZeroHeightPositiveWidthNotIgnored)
+{
+ UseMockScrollbarSettings mockScrollbarSettings;
+
+ FixedLayoutTestWebViewClient client;
+ client.m_screenInfo.deviceScaleFactor = 1;
+ int viewportWidth = 1280;
+ int viewportHeight = 0;
+
+ FrameTestHelpers::WebViewHelper webViewHelper;
+ webViewHelper.initialize(true, 0, &client, enableViewportSettings);
+ webViewHelper.webView()->resize(WebSize(viewportWidth, viewportHeight));
+
+ EXPECT_EQ(viewportWidth, webViewHelper.webViewImpl()->mainFrameImpl()->frameView()->layoutSize().width());
+ EXPECT_EQ(viewportHeight, webViewHelper.webViewImpl()->mainFrameImpl()->frameView()->layoutSize().height());
+}
+
TEST_F(WebFrameTest, DeviceScaleFactorUsesDefaultWithoutViewportTag)
{
UseMockScrollbarSettings mockScrollbarSettings;
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698