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

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

Issue 2722503006: Add slice information to DownloadDestinationObserver::DestinationUpdate(). (Closed)
Patch Set: rebase 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_file_impl.cc ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_file_unittest.cc
diff --git a/content/browser/download/download_file_unittest.cc b/content/browser/download/download_file_unittest.cc
index d4e9ddc9cb1870f998dd5c1fe78d5bb6686f0105..5a3262257dae8382091f78712b00d48e9c442eb6 100644
--- a/content/browser/download/download_file_unittest.cc
+++ b/content/browser/download/download_file_unittest.cc
@@ -66,7 +66,8 @@ class MockByteStreamReader : public ByteStreamReader {
class MockDownloadDestinationObserver : public DownloadDestinationObserver {
public:
- MOCK_METHOD2(DestinationUpdate, void(int64_t, int64_t));
+ MOCK_METHOD3(DestinationUpdate, void(
+ int64_t, int64_t, const std::vector<DownloadItem::ReceivedSlice>&));
void DestinationError(
DownloadInterruptReason reason,
int64_t bytes_so_far,
@@ -147,7 +148,9 @@ class DownloadFileTest : public testing::Test {
~DownloadFileTest() override {}
- void SetUpdateDownloadInfo(int64_t bytes, int64_t bytes_per_sec) {
+ void SetUpdateDownloadInfo(
+ int64_t bytes, int64_t bytes_per_sec,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices) {
bytes_ = bytes;
bytes_per_sec_ = bytes_per_sec;
}
@@ -157,7 +160,7 @@ class DownloadFileTest : public testing::Test {
}
void SetUp() override {
- EXPECT_CALL(*(observer_.get()), DestinationUpdate(_, _))
+ EXPECT_CALL(*(observer_.get()), DestinationUpdate(_, _, _))
.Times(AnyNumber())
.WillRepeatedly(Invoke(this, &DownloadFileTest::SetUpdateDownloadInfo));
}
@@ -286,7 +289,7 @@ class DownloadFileTest : public testing::Test {
MockDestinationCompleted(_, expected_hash));
base::RunLoop().RunUntilIdle();
::testing::Mock::VerifyAndClearExpectations(observer_.get());
- EXPECT_CALL(*(observer_.get()), DestinationUpdate(_, _))
+ EXPECT_CALL(*(observer_.get()), DestinationUpdate(_, _, _))
.Times(AnyNumber())
.WillRepeatedly(
Invoke(this, &DownloadFileTest::SetUpdateDownloadInfo));
« no previous file with comments | « content/browser/download/download_file_impl.cc ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698