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

Unified Diff: content/browser/download/download_item_impl_unittest.cc

Issue 1513413002: Enable "Hide Extension" option when "Save Link As" on the Mac Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits. Created 5 years 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: content/browser/download/download_item_impl_unittest.cc
diff --git a/content/browser/download/download_item_impl_unittest.cc b/content/browser/download/download_item_impl_unittest.cc
index 786d90311049b1fac20367975848dbc48aed379b..5968d54f6d7c1fdb341dcfc371d3d96a8d65f44c 100644
--- a/content/browser/download/download_item_impl_unittest.cc
+++ b/content/browser/download/download_item_impl_unittest.cc
@@ -283,7 +283,7 @@ class DownloadItemTest : public testing::Test {
.WillOnce(ScheduleRenameCallback(DOWNLOAD_INTERRUPT_REASON_NONE,
intermediate_path));
callback.Run(target_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- danger_type, intermediate_path);
+ danger_type, intermediate_path, false);
RunAllPendingInMessageLoops();
return download_file;
}
@@ -537,7 +537,8 @@ TEST_F(DownloadItemTest, LimitRestartsAfterInterrupted) {
.WillOnce(ScheduleRenameCallback(DOWNLOAD_INTERRUPT_REASON_NONE,
intermediate_path));
callback.Run(target_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path);
+ DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path,
+ false);
RunAllPendingInMessageLoops();
}
ASSERT_EQ(i, observer.GetResumeCount());
@@ -623,7 +624,7 @@ TEST_F(DownloadItemTest, NotificationAfterOnDownloadTargetDetermined) {
// Currently, a notification would be generated if the danger type is anything
// other than NOT_DANGEROUS.
callback.Run(target_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path);
+ DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path, false);
EXPECT_FALSE(observer.CheckUpdated());
RunAllPendingInMessageLoops();
EXPECT_TRUE(observer.CheckUpdated());
@@ -670,7 +671,7 @@ TEST_F(DownloadItemTest, DisplayName) {
.WillOnce(ScheduleRenameCallback(DOWNLOAD_INTERRUPT_REASON_NONE,
intermediate_path));
callback.Run(target_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path);
+ DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path, false);
RunAllPendingInMessageLoops();
EXPECT_EQ(FILE_PATH_LITERAL("foo.bar"),
item->GetFileNameToReportUser().value());
@@ -710,7 +711,7 @@ TEST_F(DownloadItemTest, CallbackAfterRename) {
new_intermediate_path));
callback.Run(final_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path);
+ DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path, false);
RunAllPendingInMessageLoops();
// All the callbacks should have happened by now.
::testing::Mock::VerifyAndClearExpectations(download_file);
@@ -748,7 +749,7 @@ TEST_F(DownloadItemTest, CallbackAfterInterruptedRename) {
.Times(1);
callback.Run(final_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path);
+ DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path, false);
RunAllPendingInMessageLoops();
// All the callbacks should have happened by now.
::testing::Mock::VerifyAndClearExpectations(download_file);
@@ -798,7 +799,7 @@ TEST_F(DownloadItemTest, InterruptedBeforeIntermediateRename_Restart) {
.Times(1);
callback.Run(final_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path);
+ DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path, false);
RunAllPendingInMessageLoops();
// All the callbacks should have happened by now.
::testing::Mock::VerifyAndClearExpectations(download_file);
@@ -834,7 +835,7 @@ TEST_F(DownloadItemTest, InterruptedBeforeIntermediateRename_Continue) {
EXPECT_CALL(*download_file, Detach());
callback.Run(final_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path);
+ DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path, false);
RunAllPendingInMessageLoops();
// All the callbacks should have happened by now.
::testing::Mock::VerifyAndClearExpectations(download_file);
@@ -868,7 +869,7 @@ TEST_F(DownloadItemTest, InterruptedBeforeIntermediateRename_Failed) {
.Times(1);
callback.Run(final_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path);
+ DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, intermediate_path, false);
RunAllPendingInMessageLoops();
// All the callbacks should have happened by now.
::testing::Mock::VerifyAndClearExpectations(download_file);
« no previous file with comments | « content/browser/download/download_item_impl_delegate.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698