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

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: @r202870 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 d5e0a5b23bac1ed304debccba778f53f17f980fb..d2dc590f5fc5c774fa5de28df305cee63fed589e 100644
--- a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
@@ -113,7 +113,7 @@ class TestChromeDownloadManagerDelegate : public ChromeDownloadManagerDelegate {
base::FilePath return_path = MockPromptUserForDownloadPath(download,
suggested_path,
callback);
- OnDownloadPathSelected(callback, return_path);
+ callback.Run(return_path);
}
MOCK_METHOD3(
@@ -249,6 +249,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(
@@ -298,7 +299,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));
@@ -356,11 +356,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(),
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate.cc ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698