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

Unified Diff: content/shell/shell_browser_context.cc

Issue 11830051: [content shell] don't pop up a download dialog during layout tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698