| Index: chrome/browser/download/download_manager_unittest.cc
|
| diff --git a/chrome/browser/download/download_manager_unittest.cc b/chrome/browser/download/download_manager_unittest.cc
|
| index 8b6fcfeeef47d388ce421446038aeed7267ae29d..3fb417d5f6c2610b31151de22899c55d65a5f142 100644
|
| --- a/chrome/browser/download/download_manager_unittest.cc
|
| +++ b/chrome/browser/download/download_manager_unittest.cc
|
| @@ -131,7 +131,7 @@ const struct {
|
| "text/html",
|
| false,
|
| false,
|
| - false, },
|
| + true, },
|
| { "http://www.foo.com/save-as.html",
|
| "text/html",
|
| true,
|
| @@ -146,7 +146,7 @@ const struct {
|
| "text/html",
|
| false,
|
| false,
|
| - false, },
|
| + true, },
|
| { "http://www.foo.com/extensionless-extension",
|
| "application/x-chrome-extension",
|
| true,
|
| @@ -161,7 +161,7 @@ const struct {
|
| "application/pdf",
|
| false,
|
| true,
|
| - false, },
|
| + true, },
|
| { "http://www.foo.com/always_prompt.jar",
|
| "application/jar",
|
| false,
|
| @@ -234,7 +234,8 @@ class SelectFileObserver : public DownloadManager::Observer {
|
| // Downloadmanager::Observer functions.
|
| virtual void ModelChanged() {}
|
| virtual void ManagerGoingDown() {}
|
| - virtual void SelectFileDialogDisplayed(int32 id) {
|
| + virtual void SelectFileDialogDisplayed(int32 id,
|
| + const FilePath& suggested_path) {
|
| file_dialog_ids_.insert(id);
|
| }
|
|
|
| @@ -314,7 +315,10 @@ TEST_F(DownloadManagerTest, StartDownload) {
|
| DownloadFile* download_file(
|
| new DownloadFile(info.get(), download_manager_));
|
| AddDownloadToFileManager(info->download_id, download_file);
|
| - download_file->Initialize(false);
|
| +
|
| + ScopedTempDir temp_dir;
|
| + ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| + download_file->Initialize(false, temp_dir.path());
|
| download_manager_->StartDownload(info->download_id);
|
| message_loop_.RunAllPending();
|
|
|
| @@ -587,7 +591,9 @@ TEST_F(DownloadManagerTest, DownloadOverwriteTest) {
|
| new DownloadFile(info.get(), download_manager_));
|
| download_file->Rename(cr_path);
|
| // This creates the .crdownload version of the file.
|
| - download_file->Initialize(false);
|
| + ScopedTempDir temp_dir;
|
| + ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| + download_file->Initialize(false, temp_dir.path());
|
| // |download_file| is owned by DownloadFileManager.
|
| AddDownloadToFileManager(info->download_id, download_file);
|
|
|
| @@ -663,7 +669,9 @@ TEST_F(DownloadManagerTest, DownloadRemoveTest) {
|
| new DownloadFile(info.get(), download_manager_));
|
| download_file->Rename(cr_path);
|
| // This creates the .crdownload version of the file.
|
| - download_file->Initialize(false);
|
| + ScopedTempDir temp_dir;
|
| + ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| + download_file->Initialize(false, temp_dir.path());
|
| // |download_file| is owned by DownloadFileManager.
|
| AddDownloadToFileManager(info->download_id, download_file);
|
|
|
|
|