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

Unified Diff: content/shell/browser/shell_browser_main_parts.cc

Issue 641343002: Content Shell: Introduce LayoutTestBrowserContext. (Reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 6 years, 2 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 | « content/shell/browser/shell_browser_context.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_browser_main_parts.cc
diff --git a/content/shell/browser/shell_browser_main_parts.cc b/content/shell/browser/shell_browser_main_parts.cc
index d6a067f5cae5cabd03e88fb0e776270204e6d3c1..bf24cd18f09574fb5e5e4f8f8760f54ae57ff79d 100644
--- a/content/shell/browser/shell_browser_main_parts.cc
+++ b/content/shell/browser/shell_browser_main_parts.cc
@@ -16,6 +16,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "content/public/common/url_constants.h"
+#include "content/shell/browser/layout_test/layout_test_browser_context.h"
#include "content/shell/browser/shell.h"
#include "content/shell/browser/shell_browser_context.h"
#include "content/shell/browser/shell_devtools_delegate.h"
@@ -128,9 +129,15 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
}
#endif
net_log_.reset(new ShellNetLog("content_shell"));
- browser_context_.reset(new ShellBrowserContext(false, net_log_.get()));
- off_the_record_browser_context_.reset(
- new ShellBrowserContext(true, net_log_.get()));
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) {
+ browser_context_.reset(new LayoutTestBrowserContext(false, net_log_.get()));
+ off_the_record_browser_context_.reset(
+ new LayoutTestBrowserContext(true, net_log_.get()));
+ } else {
+ browser_context_.reset(new ShellBrowserContext(false, net_log_.get()));
+ off_the_record_browser_context_.reset(
+ new ShellBrowserContext(true, net_log_.get()));
+ }
Shell::Initialize();
net::NetModule::SetResourceProvider(PlatformResourceProvider);
« no previous file with comments | « content/shell/browser/shell_browser_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698