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

Unified Diff: media/blink/multibuffer_data_source_unittest.cc

Issue 1971373002: Fix progress reporting for multibuffers to report progress for every byte we receive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 4 years, 7 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 | « media/blink/multibuffer.cc ('k') | media/blink/multibuffer_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/multibuffer_data_source_unittest.cc
diff --git a/media/blink/multibuffer_data_source_unittest.cc b/media/blink/multibuffer_data_source_unittest.cc
index 85794b75ea5e43e716bb2c549258dc451436d8c4..f265046163ba688773acbf7e17bc19254084233f 100644
--- a/media/blink/multibuffer_data_source_unittest.cc
+++ b/media/blink/multibuffer_data_source_unittest.cc
@@ -973,8 +973,10 @@ TEST_F(MultibufferDataSourceTest, Http_Read) {
ReadAt(kDataSize, kDataSize);
EXPECT_CALL(*this, ReadCallback(kDataSize));
- EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize * 2));
+ EXPECT_CALL(host_,
+ AddBufferedByteRange(kDataSize, kDataSize + kDataSize / 2));
ReceiveData(kDataSize / 2);
+ EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize * 2));
ReceiveData(kDataSize / 2);
EXPECT_TRUE(data_source_->downloading());
@@ -989,8 +991,10 @@ TEST_F(MultibufferDataSourceTest, Http_ShareData) {
ReadAt(kDataSize, kDataSize);
EXPECT_CALL(*this, ReadCallback(kDataSize));
- EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize * 2));
+ EXPECT_CALL(host_,
+ AddBufferedByteRange(kDataSize, kDataSize + kDataSize / 2));
ReceiveData(kDataSize / 2);
+ EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize * 2));
ReceiveData(kDataSize / 2);
EXPECT_TRUE(data_source_->downloading());
@@ -1313,6 +1317,7 @@ TEST_F(MultibufferDataSourceTest, SeekPastEOF) {
EXPECT_CALL(*this, ReadCallback(kDataSize));
ReadAt(0);
+ EXPECT_CALL(host_, AddBufferedByteRange(kDataSize, kDataSize + 1));
ReceiveData(1);
EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize * 3));
FinishLoading();
« no previous file with comments | « media/blink/multibuffer.cc ('k') | media/blink/multibuffer_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698