summaryrefslogtreecommitdiffstats
path: root/content/shell
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-10 18:40:08 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-10 18:40:08 +0000
commit17bc408b20642ff10d7bd5916897f31cf75c13f6 (patch)
treebeafc579b171881b32231e62cf494f88a493d08a /content/shell
parent8f120f285ec488852f06f2b0b5d8a665560ffa33 (diff)
downloadchromium_src-17bc408b20642ff10d7bd5916897f31cf75c13f6.zip
chromium_src-17bc408b20642ff10d7bd5916897f31cf75c13f6.tar.gz
chromium_src-17bc408b20642ff10d7bd5916897f31cf75c13f6.tar.bz2
[content shell] don't pop up a download dialog during layout tests
BUG=111316 R=marja@chromium.org Review URL: https://chromiumcodereview.appspot.com/11830051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r--content/shell/shell_browser_context.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/content/shell/shell_browser_context.cc b/content/shell/shell_browser_context.cc
index 9eaa6b2..86ae1a44 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();