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

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

Issue 19555002: Translate viewport related meta tags into @viewport descriptors as suggested by the CSS Device Adap… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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
« Source/core/page/PageScaleConstraintsSet.cpp ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index b347afb0e5f03ef90c11b7debe09f7280cd80d2b..757db034240faa58d2d9768953295d99897688ee 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -370,9 +370,9 @@ TEST_F(WebFrameTest, ChangeInFixedLayoutTriggersTextAutosizingRecalculate)
}
EXPECT_TRUE(multiplierSetAtLeastOnce);
- WebCore::ViewportArguments arguments = document->viewportArguments();
- arguments.width += 10;
- webViewImpl->updatePageDefinedPageScaleConstraints(arguments);
+ // Modify layout size to invalidate text autosizing multipliers.
+ webViewImpl->addUserStyleSheet("@viewport{width:1000px;}", WebVector<WebString>(), WebView::UserContentInjectInAllFrames, WebView::UserStyleInjectInExistingDocuments);
+ webViewImpl->layout();
bool multiplierCheckedAtLeastOnce = false;
renderer = document->renderer();
@@ -633,7 +633,7 @@ TEST_F(WebFrameTest, setInitialPageScaleFactorPermanently)
FixedLayoutTestWebViewClient client;
client.m_screenInfo.deviceScaleFactor = 1;
- float enforcedPageScaleFactor = 2.0f;
+ float enforcedPageScaleFactor = 2;
m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "fixed_layout.html", true, 0, &client);
m_webView->settings()->setSupportDeprecatedTargetDensityDPI(true);
@@ -669,8 +669,8 @@ TEST_F(WebFrameTest, PermanentInitialPageScaleFactorOverridesLoadWithOverviewMod
m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "viewport-auto-initial-scale.html", true, 0, &client);
m_webView->enableFixedLayoutMode(true);
- m_webView->settings()->setSupportDeprecatedTargetDensityDPI(true);
m_webView->settings()->setViewportEnabled(true);
+ m_webView->settings()->setSupportDeprecatedTargetDensityDPI(true);
m_webView->settings()->setLoadWithOverviewMode(false);
m_webView->setInitialPageScaleOverride(enforcedPageScalePactor);
m_webView->resize(WebSize(viewportWidth, viewportHeight));
« Source/core/page/PageScaleConstraintsSet.cpp ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698