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)); |