| Index: Source/web/tests/WebViewTest.cpp
|
| diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp
|
| index 6b78e957be83451e0436d406b9e88ac0067071eb..a787d88956e1fb89c3cf2659adfaee245159fa76 100644
|
| --- a/Source/web/tests/WebViewTest.cpp
|
| +++ b/Source/web/tests/WebViewTest.cpp
|
| @@ -2349,6 +2349,18 @@ TEST_F(WebViewTest, PreferredSize)
|
| EXPECT_EQ(200, size.width);
|
| EXPECT_EQ(200, size.height);
|
|
|
| + // Verify that both width and height are rounded (in this case up)
|
| + webView->setZoomLevel(WebView::zoomFactorToZoomLevel(0.9995));
|
| + size = webView->contentsPreferredMinimumSize();
|
| + EXPECT_EQ(100, size.width);
|
| + EXPECT_EQ(100, size.height);
|
| +
|
| + // Verify that both width and height are rounded (in this case down)
|
| + webView->setZoomLevel(WebView::zoomFactorToZoomLevel(1.0005));
|
| + size = webView->contentsPreferredMinimumSize();
|
| + EXPECT_EQ(100, size.width);
|
| + EXPECT_EQ(100, size.height);
|
| +
|
| url = m_baseURL + "specify_size.html?1.5px:1.5px";
|
| URLTestHelpers::registerMockedURLLoad(toKURL(url), "specify_size.html");
|
| webView = m_webViewHelper.initializeAndLoad(url, true);
|
|
|