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

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

Issue 2593183002: [downloads] Remove DownloadManager::RemoveAllDownloads. (Closed)
Patch Set: Fix SavePageBrowsertest Created 4 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
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | content/browser/download/download_stats.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_manager_impl_unittest.cc
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index 70a0d1322e80a266b1e809ce744031ab9665a056..2012e4bd555146d006c49787e2df9d27471ba6ef 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -704,41 +704,6 @@ TEST_F(DownloadManagerTest, DetermineDownloadTarget_False) {
EXPECT_EQ(path, intermediate_path_);
}
-// Confirm the DownloadManagerImpl::RemoveAllDownloads() functionality
-TEST_F(DownloadManagerTest, RemoveAllDownloads) {
- base::Time now(base::Time::Now());
- for (uint32_t i = 0; i < 4; ++i) {
- MockDownloadItemImpl& item(AddItemToManager());
- EXPECT_EQ(i, item.GetId());
- EXPECT_CALL(item, GetStartTime())
- .WillRepeatedly(Return(now));
- }
-
- // Specify states for each.
- EXPECT_CALL(GetMockDownloadItem(0), GetState())
- .WillRepeatedly(Return(DownloadItem::COMPLETE));
- EXPECT_CALL(GetMockDownloadItem(1), GetState())
- .WillRepeatedly(Return(DownloadItem::CANCELLED));
- EXPECT_CALL(GetMockDownloadItem(2), GetState())
- .WillRepeatedly(Return(DownloadItem::INTERRUPTED));
- EXPECT_CALL(GetMockDownloadItem(3), GetState())
- .WillRepeatedly(Return(DownloadItem::IN_PROGRESS));
-
- // Expectations for whether or not they'll actually be removed.
- EXPECT_CALL(GetMockDownloadItem(0), Remove())
- .WillOnce(Return());
- EXPECT_CALL(GetMockDownloadItem(1), Remove())
- .WillOnce(Return());
- EXPECT_CALL(GetMockDownloadItem(2), Remove())
- .WillOnce(Return());
- EXPECT_CALL(GetMockDownloadItem(3), Remove())
- .Times(0);
-
- download_manager_->RemoveAllDownloads();
- // Because we're mocking the download item, the Remove call doesn't
- // result in them being removed from the DownloadManager list.
-}
-
TEST_F(DownloadManagerTest, GetDownloadByGuid) {
for (uint32_t i = 0; i < 4; ++i)
AddItemToManager();
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | content/browser/download/download_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698