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

Unified Diff: chrome/browser/download/download_file_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: Overrides the user's "Downloads" folder in DownloadPrefs Created 9 years, 6 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_file_unittest.cc
diff --git a/chrome/browser/download/download_file_unittest.cc b/chrome/browser/download/download_file_unittest.cc
index f4a2a28c03af36a5a7cfd8e2b4ddbfaaac2c695e..3a39eff75a59823d7c83142dbb229208501ed57c 100644
--- a/chrome/browser/download/download_file_unittest.cc
+++ b/chrome/browser/download/download_file_unittest.cc
@@ -128,7 +128,9 @@ const int DownloadFileTest::kDummyRequestId = 67;
// has, and after it's closed.
TEST_F(DownloadFileTest, RenameFileFinal) {
CreateDownloadFile(&download_file_, 0);
- ASSERT_TRUE(download_file_->Initialize(true));
+ ScopedTempDir temp_dir;
+ ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
+ ASSERT_TRUE(download_file_->Initialize(true, temp_dir.path()));
FilePath initial_path(download_file_->full_path());
EXPECT_TRUE(file_util::PathExists(initial_path));
FilePath path_1(initial_path.InsertBeforeExtensionASCII("_1"));

Powered by Google App Engine
This is Rietveld 408576698