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

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

Issue 2703883003: Read and restore persisted slice info (Closed)
Patch Set: Created 3 years, 10 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 | « content/browser/download/download_manager_impl.cc ('k') | content/public/browser/download_item.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 2012e4bd555146d006c49787e2df9d27471ba6ef..c9a225cf121157c2590791185594bb4c07e7764b 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -102,6 +102,7 @@ class MockDownloadItemImpl : public DownloadItemImpl {
DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
DOWNLOAD_INTERRUPT_REASON_NONE,
false,
+ std::vector<DownloadItem::ReceivedSlice>(),
net::NetLogWithSource()) {}
virtual ~MockDownloadItemImpl() {}
@@ -268,6 +269,7 @@ class MockDownloadItemFactory
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
bool opened,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices,
const net::NetLogWithSource& net_log) override;
DownloadItemImpl* CreateActiveItem(
DownloadItemImplDelegate* delegate,
@@ -340,6 +342,7 @@ DownloadItemImpl* MockDownloadItemFactory::CreatePersistedItem(
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
bool opened,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices,
const net::NetLogWithSource& net_log) {
DCHECK(items_.find(download_id) == items_.end());
MockDownloadItemImpl* result =
@@ -723,7 +726,8 @@ TEST_F(DownloadManagerTest, GetDownloadByGuid) {
"application/octet-stream", "application/octet-stream", base::Time::Now(),
base::Time::Now(), std::string(), std::string(), 10, 10, std::string(),
DownloadItem::INTERRUPTED, DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
- DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED, false);
+ DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED, false,
+ std::vector<DownloadItem::ReceivedSlice>());
ASSERT_TRUE(persisted_item);
ASSERT_EQ(persisted_item, download_manager_->GetDownloadByGuid(kGuid));
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | content/public/browser/download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698