Index: content/shell/shell_browser_context.cc |
diff --git a/content/shell/shell_browser_context.cc b/content/shell/shell_browser_context.cc |
index 9eaa6b220d44593ce7023c6c75acd574af5479bc..86ae1a444b455cc1ccf871265b54b705b658e2b1 100644 |
--- a/content/shell/shell_browser_context.cc |
+++ b/content/shell/shell_browser_context.cc |
@@ -89,6 +89,11 @@ DownloadManagerDelegate* ShellBrowserContext::GetDownloadManagerDelegate() { |
if (!download_manager_delegate_.get()) { |
download_manager_delegate_ = new ShellDownloadManagerDelegate(); |
download_manager_delegate_->SetDownloadManager(manager); |
+ CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
+ if (cmd_line->HasSwitch(switches::kDumpRenderTree)) { |
+ download_manager_delegate_->SetDownloadBehaviorForTesting( |
+ path_.Append(FILE_PATH_LITERAL("downloads"))); |
+ } |
} |
return download_manager_delegate_.get(); |