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

Unified Diff: media/base/pipeline_impl_unittest.cc

Issue 2667283002: Refactor MediaResource to be multi-stream capable (Closed)
Patch Set: Created 3 years, 11 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..06e2a015d0f99c2fa93ea421f054744eb86c380b 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_, GetStreams()).WillRepeatedly(Return(empty));
EXPECT_CALL(*demuxer_, GetTimelineOffset())
.WillRepeatedly(Return(base::Time()));
@@ -147,11 +147,12 @@ 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_, GetStreams()).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