Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
index a056554db30a05b2b45a44569a2491b10d5ebbd6..a4b649e09df0dfea019e1c5bd31614a56947628f 100644 |
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
@@ -227,18 +227,13 @@ class WebFrameTest : public ::testing::Test { |
void applyViewportStyleOverride( |
FrameTestHelpers::WebViewHelper* webViewHelper) { |
- StyleSheetContents* styleSheet = |
- StyleSheetContents::create(CSSParserContext(UASheetMode, nullptr)); |
- styleSheet->parseString(loadResourceAsASCIIString("viewportAndroid.css")); |
- RuleSet* ruleSet = RuleSet::create(); |
- ruleSet->addRulesFromSheet(styleSheet, MediaQueryEvaluator("screen")); |
- |
Document* document = |
toLocalFrame(webViewHelper->webView()->page()->mainFrame())->document(); |
- document->ensureStyleResolver() |
- .viewportStyleResolver() |
- ->collectViewportRules(ruleSet, ViewportStyleResolver::UserAgentOrigin); |
- document->ensureStyleResolver().viewportStyleResolver()->resolve(); |
+ document->settings()->setViewportStyle(WebViewportStyle::Mobile); |
+ ViewportStyleResolver& resolver = |
+ document->styleEngine().ensureViewportStyleResolver(); |
+ resolver.collectViewportRulesFromUASheets(); |
+ resolver.resolve(); |
} |
static void configueCompositingWebView(WebSettings* settings) { |