summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/tests/WebFrameTest.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-06-27 09:28:46 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-06-27 09:28:46 +0200
commit6668b07fcd51f86be243b9e08e667224e30c0cf8 (patch)
tree64f466e09b68a77ae1156c0d35cd5b95e18a34ca /Source/WebKit/chromium/tests/WebFrameTest.cpp
parente7923d9de38974f0c6fb7646c898a6ea618261e8 (diff)
downloadqtwebkit-6668b07fcd51f86be243b9e08e667224e30c0cf8.tar.gz
Imported WebKit commit 26cd9bd8ab0471ffe987c9b60368f63dc0f1f31b (http://svn.webkit.org/repository/webkit/trunk@121325)
New snapshot with more Windows build fixes
Diffstat (limited to 'Source/WebKit/chromium/tests/WebFrameTest.cpp')
-rw-r--r--Source/WebKit/chromium/tests/WebFrameTest.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/WebKit/chromium/tests/WebFrameTest.cpp b/Source/WebKit/chromium/tests/WebFrameTest.cpp
index 40705808d..4e2b0c5ea 100644
--- a/Source/WebKit/chromium/tests/WebFrameTest.cpp
+++ b/Source/WebKit/chromium/tests/WebFrameTest.cpp
@@ -284,6 +284,28 @@ TEST_F(WebFrameTest, FixedLayoutInitializeAtMinimumPageScale)
}
#endif
+TEST_F(WebFrameTest, CanOverrideMaximumScaleFactor)
+{
+ registerMockedHttpURLLoad("no_scale_for_you.html");
+
+ FixedLayoutTestWebViewClient client;
+ client.m_screenInfo.horizontalDPI = 160;
+ int viewportWidth = 640;
+ int viewportHeight = 480;
+ client.m_windowRect = WebRect(0, 0, viewportWidth, viewportHeight);
+
+ WebViewImpl* webViewImpl = static_cast<WebViewImpl*>(FrameTestHelpers::createWebViewAndLoad(m_baseURL + "no_scale_for_you.html", true, 0, &client));
+ webViewImpl->enableFixedLayoutMode(true);
+ webViewImpl->settings()->setViewportEnabled(true);
+ webViewImpl->resize(WebSize(viewportWidth, viewportHeight));
+
+ EXPECT_EQ(1.0f, webViewImpl->maximumPageScaleFactor());
+
+ webViewImpl->setIgnoreViewportTagMaximumScale(true);
+
+ EXPECT_EQ(4.0f, webViewImpl->maximumPageScaleFactor());
+}
+
#if ENABLE(GESTURE_EVENTS)
TEST_F(WebFrameTest, DivAutoZoomParamsTest)
{