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

Unified Diff: media/base/pipeline_impl_unittest.cc

Issue 2491043003: MediaResource refactoring to support multiple streams (Closed)
Patch Set: Added a TODO about DemuxerStream enabled/set_enabled methods 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 | « media/base/pipeline_impl.cc ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_impl_unittest.cc
diff --git a/media/base/pipeline_impl_unittest.cc b/media/base/pipeline_impl_unittest.cc
index 7f0be8703d01f61ec680dc73d0516466a50ddb92..f4ee099b3449462ddb52d8fcd679195ea082d038 100644
--- a/media/base/pipeline_impl_unittest.cc
+++ b/media/base/pipeline_impl_unittest.cc
@@ -105,8 +105,8 @@ class PipelineImplTest : public ::testing::Test {
renderer_client_(nullptr) {
// SetDemuxerExpectations() adds overriding expectations for expected
// non-NULL streams.
- DemuxerStream* null_pointer = NULL;
- EXPECT_CALL(*demuxer_, GetStream(_)).WillRepeatedly(Return(null_pointer));
+ std::vector<DemuxerStream*> empty;
+ EXPECT_CALL(*demuxer_, GetAllStreams()).WillRepeatedly(Return(empty));
EXPECT_CALL(*demuxer_, GetTimelineOffset())
.WillRepeatedly(Return(base::Time()));
@@ -147,11 +147,13 @@ class PipelineImplTest : public ::testing::Test {
PostCallback<1>(PIPELINE_OK)));
// Configure the demuxer to return the streams.
+ std::vector<DemuxerStream*> mock_streams;
for (size_t i = 0; i < streams->size(); ++i) {
DemuxerStream* stream = (*streams)[i];
- EXPECT_CALL(*demuxer_, GetStream(stream->type()))
- .WillRepeatedly(Return(stream));
+ mock_streams.push_back(stream);
}
+ EXPECT_CALL(*demuxer_, GetAllStreams())
+ .WillRepeatedly(Return(mock_streams));
}
void SetDemuxerExpectations(MockDemuxerStreamVector* streams) {
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698