Chromium Code Reviews| Index: Source/web/tests/WebFrameTest.cpp |
| diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp |
| index c1b744aad349f3524ec617b1376b4646cfb30d66..f6fef04984a589b44a673f0e6803dda88c2b7ba0 100644 |
| --- a/Source/web/tests/WebFrameTest.cpp |
| +++ b/Source/web/tests/WebFrameTest.cpp |
| @@ -859,6 +859,24 @@ 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 = 640; |
| + int viewportHeight = 0; |
| + |
| + FrameTestHelpers::WebViewHelper webViewHelper; |
| + webViewHelper.initialize(true, 0, &client, enableViewportSettings); |
| + webViewHelper.webView()->settings()->setUseWideViewport(true); |
|
mnaganov (inactive)
2014/02/20 15:50:25
I think this isn't needed, as wide viewport is tur
mkosiba (inactive)
2014/02/20 15:59:32
Done.
|
| + 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; |