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