Index: Source/web/tests/ViewportTest.cpp |
diff --git a/Source/web/tests/ViewportTest.cpp b/Source/web/tests/ViewportTest.cpp |
index 1851db5f19cd63e0af48554d677934da225d1ece..94a252106555f069e9f7277851d179ad96b18f1f 100644 |
--- a/Source/web/tests/ViewportTest.cpp |
+++ b/Source/web/tests/ViewportTest.cpp |
@@ -3203,4 +3203,30 @@ TEST_F(ViewportTest, viewportWarnings7) |
EXPECT_EQ(0U, webFrameClient.messages.size()); |
} |
+TEST_F(ViewportTest, viewportWarnings8) |
+{ |
+ ConsoleMessageWebFrameClient webFrameClient; |
+ |
+ registerMockedHttpURLLoad("viewport/viewport-warnings-8.html"); |
+ |
+ FrameTestHelpers::WebViewHelper webViewHelper; |
+ webViewHelper.initializeAndLoad(m_baseURL + "viewport/viewport-warnings-8.html", true, &webFrameClient, 0, setViewportSettings); |
+ |
+ Page* page = webViewHelper.webViewImpl()->page(); |
+ PageScaleConstraints constraints = runViewportTest(page, 320, 352); |
+ |
+ EXPECT_EQ(1U, webFrameClient.messages.size()); |
+ EXPECT_EQ(WebConsoleMessage::LevelWarning, webFrameClient.messages[0].level); |
+ // 123 followed by a lowercase i and U+0307 (COMBINING DOT ABOVE). |
+ EXPECT_STREQ("The value \"123i̇\" for key \"width\" was truncated to its numeric prefix.", |
kenneth.christiansen
2014/06/20 14:51:51
Notice that this is not an i, but an i with a dot
|
+ webFrameClient.messages[0].text.utf8().c_str()); |
+ |
+ 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); |
+} |
+ |
} // namespace |