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

Unified Diff: chrome/browser/download/download_manager_unittest.cc

Issue 6973052: When the download folder does not exist, change the download folder to a user's "Downloads" (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed the change in url_request_mock_http_job.h Created 9 years, 4 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
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 18dababfda4cf57dc35730ffa87f71898faae8e4..14d714db70df445203c69234021c1dc2fc9766a0 100644
--- a/chrome/browser/download/download_manager_unittest.cc
+++ b/chrome/browser/download/download_manager_unittest.cc
@@ -240,7 +240,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);
}
@@ -297,8 +298,11 @@ class ItemObserver : public DownloadItem::Observer {
TEST_F(DownloadManagerTest, StartDownload) {
BrowserThread io_thread(BrowserThread::IO, &message_loop_);
+ ScopedTempDir download_save_dir;
+ ASSERT_TRUE(download_save_dir.CreateUniqueTempDir());
PrefService* prefs = profile_->GetPrefs();
- prefs->SetFilePath(prefs::kDownloadDefaultDirectory, FilePath());
+ prefs->SetFilePath(prefs::kDownloadDefaultDirectory,
+ download_save_dir.path());
download_manager_->download_prefs()->EnableAutoOpenBasedOnExtension(
FilePath(FILE_PATH_LITERAL("example.pdf")));

Powered by Google App Engine
This is Rietveld 408576698