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

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

Issue 1913833002: Current work-in-progress crbug.com/567021 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More assert fixes Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b2d4ad274c57325a801197399a9ac6e4980b9bcb..31e6f67e8ae865ce4951b74500840e2137dc86a8 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -218,14 +218,10 @@ protected:
void applyViewportStyleOverride(FrameTestHelpers::WebViewHelper* webViewHelper)
{
- StyleSheetContents* styleSheet = StyleSheetContents::create(CSSParserContext(UASheetMode, 0));
- styleSheet->parseString(loadResourceAsASCIIString("viewportAndroid.css"));
- RuleSet* ruleSet = RuleSet::create();
- ruleSet->addRulesFromSheet(styleSheet, MediaQueryEvaluator("screen"));
-
Document* document = toLocalFrame(webViewHelper->webViewImpl()->page()->mainFrame())->document();
- document->ensureStyleResolver().viewportStyleResolver()->collectViewportRules(ruleSet, ViewportStyleResolver::UserAgentOrigin);
- document->ensureStyleResolver().viewportStyleResolver()->resolve();
+ document->settings()->setViewportStyle(WebViewportStyle::Mobile);
+ document->styleEngine().ensureViewportStyleResolver().collectViewportRulesFromUASheets();
+ document->styleEngine().ensureViewportStyleResolver().resolve();
}
static void configueCompositingWebView(WebSettings* settings)
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698