| Index: media/filters/ffmpeg_demuxer_unittest.cc
|
| diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
|
| index c4924934f724477c130f992db97e86bcc72fe18f..dd68e6c1918eb15eb83c4b75df0d9c6c5fa7ff62 100644
|
| --- a/media/filters/ffmpeg_demuxer_unittest.cc
|
| +++ b/media/filters/ffmpeg_demuxer_unittest.cc
|
| @@ -137,7 +137,8 @@ class FFmpegDemuxerTest : public testing::Test {
|
| base::TimeDelta::FromMicroseconds(kDurations[AV_STREAM_AUDIO]);
|
| EXPECT_CALL(host_, SetDuration(expected_duration));
|
|
|
| - demuxer_->Initialize(data_source_.get(), NewExpectedCallback());
|
| + demuxer_->Initialize(data_source_.get(),
|
| + NewExpectedStatusCallback(PIPELINE_OK));
|
| message_loop_.RunAllPending();
|
| }
|
|
|
| @@ -175,9 +176,9 @@ TEST_F(FFmpegDemuxerTest, Initialize_OpenFails) {
|
| // Simulate av_open_input_file() failing.
|
| EXPECT_CALL(mock_ffmpeg_, AVOpenInputFile(_, _, NULL, 0, NULL))
|
| .WillOnce(Return(-1));
|
| - EXPECT_CALL(host_, SetError(DEMUXER_ERROR_COULD_NOT_OPEN));
|
|
|
| - demuxer_->Initialize(data_source_.get(), NewExpectedCallback());
|
| + demuxer_->Initialize(data_source_.get(),
|
| + NewExpectedStatusCallback(DEMUXER_ERROR_COULD_NOT_OPEN));
|
| message_loop_.RunAllPending();
|
| }
|
|
|
| @@ -188,9 +189,9 @@ TEST_F(FFmpegDemuxerTest, Initialize_ParseFails) {
|
| EXPECT_CALL(mock_ffmpeg_, AVFindStreamInfo(&format_context_))
|
| .WillOnce(Return(AVERROR_IO));
|
| EXPECT_CALL(mock_ffmpeg_, AVCloseInputFile(&format_context_));
|
| - EXPECT_CALL(host_, SetError(DEMUXER_ERROR_COULD_NOT_PARSE));
|
|
|
| - demuxer_->Initialize(data_source_.get(), NewExpectedCallback());
|
| + demuxer_->Initialize(data_source_.get(),
|
| + NewExpectedStatusCallback(DEMUXER_ERROR_COULD_NOT_PARSE));
|
| message_loop_.RunAllPending();
|
| }
|
|
|
| @@ -200,10 +201,11 @@ TEST_F(FFmpegDemuxerTest, Initialize_NoStreams) {
|
| SCOPED_TRACE("");
|
| InitializeDemuxerMocks();
|
| }
|
| - EXPECT_CALL(host_, SetError(DEMUXER_ERROR_NO_SUPPORTED_STREAMS));
|
| format_context_.nb_streams = 0;
|
|
|
| - demuxer_->Initialize(data_source_.get(), NewExpectedCallback());
|
| + demuxer_->Initialize(
|
| + data_source_.get(),
|
| + NewExpectedStatusCallback(DEMUXER_ERROR_NO_SUPPORTED_STREAMS));
|
| message_loop_.RunAllPending();
|
| }
|
|
|
| @@ -213,11 +215,12 @@ TEST_F(FFmpegDemuxerTest, Initialize_DataStreamOnly) {
|
| SCOPED_TRACE("");
|
| InitializeDemuxerMocks();
|
| }
|
| - EXPECT_CALL(host_, SetError(DEMUXER_ERROR_NO_SUPPORTED_STREAMS));
|
| EXPECT_EQ(format_context_.streams[0], &streams_[AV_STREAM_DATA]);
|
| format_context_.nb_streams = 1;
|
|
|
| - demuxer_->Initialize(data_source_.get(), NewExpectedCallback());
|
| + demuxer_->Initialize(
|
| + data_source_.get(),
|
| + NewExpectedStatusCallback(DEMUXER_ERROR_NO_SUPPORTED_STREAMS));
|
| message_loop_.RunAllPending();
|
| }
|
|
|
|
|