| Index: media/filters/ffmpeg_video_decoder_unittest.cc
|
| diff --git a/media/filters/ffmpeg_video_decoder_unittest.cc b/media/filters/ffmpeg_video_decoder_unittest.cc
|
| index b4d4ace1ffd905065e658ec2ab84db3725e1805d..407f6850af538dcf63cf3ca80fb5ec0cfc727065 100644
|
| --- a/media/filters/ffmpeg_video_decoder_unittest.cc
|
| +++ b/media/filters/ffmpeg_video_decoder_unittest.cc
|
| @@ -118,6 +118,7 @@ class FFmpegVideoDecoderTest : public testing::Test {
|
| scoped_refptr<DataBuffer> buffer_;
|
| scoped_refptr<DataBuffer> end_of_stream_buffer_;
|
| StrictMock<MockFilterHost> host_;
|
| + StrictMock<MockFilterCallback> callback_;
|
| MessageLoop message_loop_;
|
|
|
| // FFmpeg fixtures.
|
| @@ -162,8 +163,10 @@ TEST_F(FFmpegVideoDecoderTest, Initialize_QueryInterfaceFails) {
|
| EXPECT_CALL(*demuxer_, QueryInterface(AVStreamProvider::interface_id()))
|
| .WillOnce(ReturnNull());
|
| EXPECT_CALL(host_, Error(PIPELINE_ERROR_DECODE));
|
| + EXPECT_CALL(callback_, OnFilterCallback());
|
| + EXPECT_CALL(callback_, OnCallbackDestroyed());
|
|
|
| - EXPECT_TRUE(decoder_->Initialize(demuxer_));
|
| + decoder_->Initialize(demuxer_, callback_.NewCallback());
|
| message_loop_.RunAllPending();
|
| }
|
|
|
| @@ -177,8 +180,10 @@ TEST_F(FFmpegVideoDecoderTest, Initialize_FindDecoderFails) {
|
| EXPECT_CALL(*MockFFmpeg::get(), AVCodecFindDecoder(CODEC_ID_NONE))
|
| .WillOnce(ReturnNull());
|
| EXPECT_CALL(host_, Error(PIPELINE_ERROR_DECODE));
|
| + EXPECT_CALL(callback_, OnFilterCallback());
|
| + EXPECT_CALL(callback_, OnCallbackDestroyed());
|
|
|
| - EXPECT_TRUE(decoder_->Initialize(demuxer_));
|
| + decoder_->Initialize(demuxer_, callback_.NewCallback());
|
| message_loop_.RunAllPending();
|
| }
|
|
|
| @@ -194,8 +199,10 @@ TEST_F(FFmpegVideoDecoderTest, Initialize_InitThreadFails) {
|
| EXPECT_CALL(*MockFFmpeg::get(), AVCodecThreadInit(&codec_context_, 2))
|
| .WillOnce(Return(-1));
|
| EXPECT_CALL(host_, Error(PIPELINE_ERROR_DECODE));
|
| + EXPECT_CALL(callback_, OnFilterCallback());
|
| + EXPECT_CALL(callback_, OnCallbackDestroyed());
|
|
|
| - EXPECT_TRUE(decoder_->Initialize(demuxer_));
|
| + decoder_->Initialize(demuxer_, callback_.NewCallback());
|
| message_loop_.RunAllPending();
|
| }
|
|
|
| @@ -213,8 +220,10 @@ TEST_F(FFmpegVideoDecoderTest, Initialize_OpenDecoderFails) {
|
| EXPECT_CALL(*MockFFmpeg::get(), AVCodecOpen(&codec_context_, &codec_))
|
| .WillOnce(Return(-1));
|
| EXPECT_CALL(host_, Error(PIPELINE_ERROR_DECODE));
|
| + EXPECT_CALL(callback_, OnFilterCallback());
|
| + EXPECT_CALL(callback_, OnCallbackDestroyed());
|
|
|
| - EXPECT_TRUE(decoder_->Initialize(demuxer_));
|
| + decoder_->Initialize(demuxer_, callback_.NewCallback());
|
| message_loop_.RunAllPending();
|
| }
|
|
|
| @@ -231,9 +240,10 @@ TEST_F(FFmpegVideoDecoderTest, Initialize_Successful) {
|
| .WillOnce(Return(0));
|
| EXPECT_CALL(*MockFFmpeg::get(), AVCodecOpen(&codec_context_, &codec_))
|
| .WillOnce(Return(0));
|
| - EXPECT_CALL(host_, InitializationComplete());
|
| + EXPECT_CALL(callback_, OnFilterCallback());
|
| + EXPECT_CALL(callback_, OnCallbackDestroyed());
|
|
|
| - EXPECT_TRUE(decoder_->Initialize(demuxer_));
|
| + decoder_->Initialize(demuxer_, callback_.NewCallback());
|
| message_loop_.RunAllPending();
|
|
|
| // Test that the output media format is an uncompressed video surface that
|
|
|