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

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

Issue 2618743006: Use previous target path when resuming a download after crash (Closed)
Patch Set: add code for test Created 3 years, 11 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_target_determiner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_target_determiner_unittest.cc
diff --git a/chrome/browser/download/download_target_determiner_unittest.cc b/chrome/browser/download/download_target_determiner_unittest.cc
index 68585ab67bec87cacf2c0c63230dd29fa5f2da41..72e1827364978ce76b3f1f140eb86a8a60fae478 100644
--- a/chrome/browser/download/download_target_determiner_unittest.cc
+++ b/chrome/browser/download/download_target_determiner_unittest.cc
@@ -1569,7 +1569,14 @@ TEST_F(DownloadTargetDeterminerTest, ResumedNoPrompt) {
// type == AUTOMATIC.
EXPECT_CALL(*delegate(), NotifyExtensions(_, _, _))
.Times(test_case.test_type == AUTOMATIC ? 1 : 0);
- EXPECT_CALL(*delegate(), ReserveVirtualPath(_, expected_path, false, _, _));
+ // When resuming an AUTOMATIC download with non-empty initial path, the file
+ // name conflict action should be UNIQUIFY.
+ DownloadPathReservationTracker::FilenameConflictAction action =
+ test_case.test_type == AUTOMATIC ?
+ DownloadPathReservationTracker::UNIQUIFY :
+ DownloadPathReservationTracker::OVERWRITE;
+ EXPECT_CALL(*delegate(), ReserveVirtualPath(
+ _, expected_path, false, action, _));
EXPECT_CALL(*delegate(), PromptUserForDownloadPath(_, expected_path, _))
.Times(0);
EXPECT_CALL(*delegate(), DetermineLocalPath(_, expected_path, _));
« no previous file with comments | « chrome/browser/download/download_target_determiner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698