Index: media/mojo/clients/mojo_renderer_unittest.cc |
diff --git a/media/mojo/clients/mojo_renderer_unittest.cc b/media/mojo/clients/mojo_renderer_unittest.cc |
index f96a945e2b2b33ad0ac00aeac9199aa1ebcbcc95..d7b9e4a2063e681e718863e20fba96c4d32c83bd 100644 |
--- a/media/mojo/clients/mojo_renderer_unittest.cc |
+++ b/media/mojo/clients/mojo_renderer_unittest.cc |
@@ -77,7 +77,8 @@ class MojoRendererTest : public ::testing::Test { |
// CreateAudioStream() and CreateVideoStream() overrides expectations for |
// expected non-NULL streams. |
- EXPECT_CALL(demuxer_, GetStream(_)).WillRepeatedly(Return(nullptr)); |
+ std::vector<DemuxerStream*> empty; |
+ EXPECT_CALL(demuxer_, GetStreams()).WillRepeatedly(Return(empty)); |
EXPECT_CALL(*mock_renderer_, GetMediaTime()) |
.WillRepeatedly(Return(base::TimeDelta())); |
@@ -105,8 +106,11 @@ class MojoRendererTest : public ::testing::Test { |
void CreateAudioStream() { |
audio_stream_ = CreateStream(DemuxerStream::AUDIO); |
- EXPECT_CALL(demuxer_, GetStream(DemuxerStream::AUDIO)) |
- .WillRepeatedly(Return(audio_stream_.get())); |
+ std::vector<DemuxerStream*> streams; |
+ streams.push_back(audio_stream_.get()); |
+ if (video_stream_) |
+ streams.push_back(video_stream_.get()); |
+ EXPECT_CALL(demuxer_, GetStreams()).WillRepeatedly(Return(streams)); |
xhwang
2017/02/01 18:26:04
It's odd that CreateAudioStream() needs to worry a
servolk
2017/02/01 22:29:17
Done.
|
} |
void CreateVideoStream(bool is_encrypted = false) { |
@@ -114,8 +118,11 @@ class MojoRendererTest : public ::testing::Test { |
video_stream_->set_video_decoder_config( |
is_encrypted ? TestVideoConfig::NormalEncrypted() |
: TestVideoConfig::Normal()); |
- EXPECT_CALL(demuxer_, GetStream(DemuxerStream::VIDEO)) |
- .WillRepeatedly(Return(video_stream_.get())); |
+ std::vector<DemuxerStream*> streams; |
+ if (audio_stream_) |
xhwang
2017/02/01 18:26:04
ditto
servolk
2017/02/01 22:29:17
Done.
|
+ streams.push_back(audio_stream_.get()); |
+ streams.push_back(video_stream_.get()); |
+ EXPECT_CALL(demuxer_, GetStreams()).WillRepeatedly(Return(streams)); |
} |
void InitializeAndExpect(PipelineStatus status) { |