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

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: Applied Pawel's comments 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
« no previous file with comments | « chrome/browser/download/download_manager.cc ('k') | chrome/browser/download/download_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7e0ebf2863b0f500c3736614f0710e251aaea9d3..dbb188d2dbd011663733ea91230fa777cc5b4251 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")));
« no previous file with comments | « chrome/browser/download/download_manager.cc ('k') | chrome/browser/download/download_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698