diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-10 18:40:08 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-10 18:40:08 +0000 |
commit | 17bc408b20642ff10d7bd5916897f31cf75c13f6 (patch) | |
tree | beafc579b171881b32231e62cf494f88a493d08a /content/shell | |
parent | 8f120f285ec488852f06f2b0b5d8a665560ffa33 (diff) | |
download | chromium_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.cc | 5 |
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(); |