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

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

Issue 416173003: Merge 176713 "Uptake http://trac.webkit.org/changeset/169848" (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2062/
Patch Set: Created 6 years, 5 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/core/html/HTMLMetaElement-in.cpp ('k') | Source/web/tests/data/viewport/viewport-138.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/ViewportTest.cpp
===================================================================
--- Source/web/tests/ViewportTest.cpp (revision 178856)
+++ Source/web/tests/ViewportTest.cpp (working copy)
@@ -2529,6 +2529,24 @@
EXPECT_TRUE(page->viewportDescription().userZoom);
}
+TEST_F(ViewportTest, viewport138)
+{
+ registerMockedHttpURLLoad("viewport/viewport-138.html");
+
+ FrameTestHelpers::WebViewHelper webViewHelper;
+ webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-138.html", true, 0, 0, setViewportSettings);
+
+ Page* page = webViewHelper.webViewImpl()->page();
+ PageScaleConstraints constraints = runViewportTest(page, 320, 352);
+
+ EXPECT_NEAR(123.0f, constraints.layoutSize.width(), 0.01);
+ EXPECT_NEAR(135.3f, constraints.layoutSize.height(), 0.01);
+ EXPECT_NEAR(2.60f, constraints.initialScale, 0.01f);
+ EXPECT_NEAR(2.60f, constraints.minimumScale, 0.01f);
+ EXPECT_NEAR(5.0f, constraints.maximumScale, 0.01f);
+ EXPECT_TRUE(page->viewportDescription().userZoom);
+}
+
TEST_F(ViewportTest, viewportLegacyHandheldFriendly)
{
UseMockScrollbarSettings mockScrollbarSettings;
« no previous file with comments | « Source/core/html/HTMLMetaElement-in.cpp ('k') | Source/web/tests/data/viewport/viewport-138.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698