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

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

Issue 1061153002: Remove WebViewImpl preferred size hack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use Flexbox to avoid whitespace issue Created 5 years, 8 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') | Source/web/tests/data/specify_size.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebViewTest.cpp
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp
index c23261df002ea70ffe947c29c9e1f2a04e12d169..4fda892efb12f939924d622576152de285620580 100644
--- a/Source/web/tests/WebViewTest.cpp
+++ b/Source/web/tests/WebViewTest.cpp
@@ -2349,6 +2349,15 @@ TEST_F(WebViewTest, PreferredSize)
size = webView->contentsPreferredMinimumSize();
EXPECT_EQ(200, size.width);
EXPECT_EQ(200, 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);
+
+ webView->setZoomLevel(WebView::zoomFactorToZoomLevel(1));
+ size = webView->contentsPreferredMinimumSize();
+ EXPECT_EQ(2, size.width);
+ EXPECT_EQ(2, size.height);
}
class UnhandledTapWebViewClient : public FrameTestHelpers::TestWebViewClient {
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | Source/web/tests/data/specify_size.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698