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

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

Issue 12662032: Merge SavePackageFilePicker{,ChromeOS} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r198452 Created 7 years, 7 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/chrome_download_manager_delegate_unittest.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
index e72b837872a4142e69d3af12e88149ccdc47f6bb..741508b22b4d4f1f34da9d0dd06f716b5f41f822 100644
--- a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
@@ -251,6 +251,7 @@ base::FilePath ChromeDownloadManagerDelegateTest::GetPathInDownloadDir(
void ChromeDownloadManagerDelegateTest::SetDefaultDownloadPath(
const base::FilePath& path) {
pref_service_->SetFilePath(prefs::kDownloadDefaultDirectory, path);
+ pref_service_->SetFilePath(prefs::kSaveFileDefaultDirectory, path);
}
void ChromeDownloadManagerDelegateTest::DetermineDownloadTarget(
@@ -300,7 +301,6 @@ DownloadPrefs* ChromeDownloadManagerDelegateTest::download_prefs() {
TEST_F(ChromeDownloadManagerDelegateTest, StartDownload_LastSavePath) {
GURL download_url("http://example.com/foo.txt");
- delegate()->ClearLastDownloadPath();
scoped_ptr<content::MockDownloadItem> save_as_download(
CreateActiveDownloadItem(0));
@@ -358,11 +358,9 @@ TEST_F(ChromeDownloadManagerDelegateTest, StartDownload_LastSavePath) {
VerifyAndClearExpectations();
}
- // Clear the last download path.
- delegate()->ClearLastDownloadPath();
-
{
// The prompt path for the next download should be the default.
+ download_prefs()->SetSaveFilePath(download_prefs()->DownloadPath());
DownloadTarget result;
base::FilePath expected_prompt_path(GetPathInDownloadDir("foo.txt"));
EXPECT_CALL(*delegate(),
@@ -373,3 +371,5 @@ TEST_F(ChromeDownloadManagerDelegateTest, StartDownload_LastSavePath) {
VerifyAndClearExpectations();
}
}
+
+// TODO(benjhayden): DownloadPrefs::[Set]SaveFilePath() on-the-record vs. off

Powered by Google App Engine
This is Rietveld 408576698