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

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

Issue 10831302: Download resumption - Preliminary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed signed/unsigned compare issue. Created 8 years, 1 month 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_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 5a037d38ac9b7dbdcbcbcfc8bdd03be3c4259691..d9ab1b39dbdb446f7fd805a1c834ceeeb245450e 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -99,11 +99,12 @@ class MockDownloadItemImpl : public DownloadItemImpl {
MOCK_METHOD0(OnDownloadedFileRemoved, void());
MOCK_METHOD0(MaybeCompleteDownload, void());
virtual void Start(
- scoped_ptr<DownloadFile> download_file) OVERRIDE {
- MockStart(download_file.get());
+ scoped_ptr<DownloadFile> download_file,
+ scoped_ptr<DownloadRequestHandleInterface> req_handle) OVERRIDE {
+ MockStart(download_file.get(), req_handle.get());
}
- MOCK_METHOD1(MockStart, void(DownloadFile*));
+ MOCK_METHOD2(MockStart, void(DownloadFile*, DownloadRequestHandleInterface*));
MOCK_METHOD1(Delete, void(DeleteReason));
MOCK_METHOD0(Remove, void());
@@ -238,7 +239,6 @@ class MockDownloadItemFactory
virtual DownloadItemImpl* CreateActiveItem(
DownloadItemImplDelegate* delegate,
const DownloadCreateInfo& info,
- scoped_ptr<DownloadRequestHandleInterface> request_handle,
const net::BoundNetLog& bound_net_log) OVERRIDE;
virtual DownloadItemImpl* CreateSavePageItem(
DownloadItemImplDelegate* delegate,
@@ -309,7 +309,6 @@ DownloadItemImpl* MockDownloadItemFactory::CreatePersistedItem(
DownloadItemImpl* MockDownloadItemFactory::CreateActiveItem(
DownloadItemImplDelegate* delegate,
const DownloadCreateInfo& info,
- scoped_ptr<DownloadRequestHandleInterface> request_handle,
const net::BoundNetLog& bound_net_log) {
int local_id = info.download_id.local();
DCHECK(items_.find(local_id) == items_.end());
@@ -324,7 +323,7 @@ DownloadItemImpl* MockDownloadItemFactory::CreateActiveItem(
// Active items are created and then immediately are called to start
// the download.
- EXPECT_CALL(*result, MockStart(_));
+ EXPECT_CALL(*result, MockStart(_, _));
return result;
}
@@ -497,14 +496,15 @@ class DownloadManagerTest : public testing::Test {
++next_download_id_;
info.download_id = DownloadId(kDownloadIdDomain, id);
info.request_handle = DownloadRequestHandle();
- download_manager_->CreateDownloadItem(&info, net::BoundNetLog());
+ download_manager_->CreateDownloadItem(&info);
DCHECK(mock_download_item_factory_->GetItem(id));
MockDownloadItemImpl& item(*mock_download_item_factory_->GetItem(id));
// Satisfy expectation. If the item is created in StartDownload(),
// we call Start on it immediately, so we need to set that expectation
// in the factory.
- item.Start(scoped_ptr<DownloadFile>());
+ scoped_ptr<DownloadRequestHandleInterface> req_handle;
+ item.Start(scoped_ptr<DownloadFile>(), req_handle.Pass());
return item;
}
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | content/browser/download/download_net_log_parameters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698