Chromium Code Reviews| 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 ec89665f2e0fe7a8090c7cc557f8f0ce3075b54e..c318a7398573aeecf0e468f494ca7d5061d24ac8 100644 |
| --- a/media/filters/ffmpeg_video_decoder_unittest.cc |
| +++ b/media/filters/ffmpeg_video_decoder_unittest.cc |
| @@ -384,14 +384,12 @@ TEST_F(FFmpegVideoDecoderTest, DecodeEncryptedFrame_Normal) { |
| TEST_F(FFmpegVideoDecoderTest, DecodeEncryptedFrame_NoKey) { |
| Initialize(); |
| + encrypted_i_frame_buffer_->SetDecryptConfig(scoped_ptr<DecryptConfig>( |
| + new DecryptConfig(kKeyId, arraysize(kKeyId) - 1))); |
| + |
|
xhwang
2012/04/20 19:08:28
This is to fix a bug in the test. If we don't SetD
ddorwin
2012/04/20 19:18:50
Should we copy the comment "// Simulate decoding a
xhwang
2012/04/20 19:51:01
Done.
|
| EXPECT_CALL(*demuxer_, Read(_)) |
| .WillRepeatedly(ReturnBuffer(encrypted_i_frame_buffer_)); |
| - |
| - // The error is only raised on the second decode attempt, so we expect at |
| - // least one successful decode but we don't expect FrameReady() to be |
| - // executed as an error is raised instead. |
| - EXPECT_CALL(statistics_cb_, OnStatistics(_)); |
| - EXPECT_CALL(host_, SetError(PIPELINE_ERROR_DECODE)); |
| + EXPECT_CALL(host_, SetError(PIPELINE_ERROR_DECRYPT)); |
| // Our read should still get satisfied with end of stream frame during an |
| // error. |
| @@ -409,21 +407,20 @@ TEST_F(FFmpegVideoDecoderTest, DecodeEncryptedFrame_WrongKey) { |
| decoder_->decryptor()->AddKey(kKeyId, arraysize(kKeyId) - 1, |
| kWrongKey, arraysize(kWrongKey) - 1); |
| -#if defined(OS_LINUX) |
| - // Using the wrong key on linux doesn't cause an decryption error but actually |
| - // attempts to decode the content, however we're unable to distinguish between |
| - // the two. |
| - // |
| - // TODO(xhwang): Add a decryption error code, see http://crbug.com/121177 |
| - EXPECT_CALL(statistics_cb_, OnStatistics(_)); |
| -#endif |
| - |
| encrypted_i_frame_buffer_->SetDecryptConfig(scoped_ptr<DecryptConfig>( |
| new DecryptConfig(kKeyId, arraysize(kKeyId) - 1))); |
| EXPECT_CALL(*demuxer_, Read(_)) |
| .WillRepeatedly(ReturnBuffer(encrypted_i_frame_buffer_)); |
| +#if defined(OS_LINUX) |
| + // Using the wrong key on linux doesn't cause an decryption error but actually |
| + // attempts to decode the content, however we're unable to distinguish between |
| + // the two. See: crbug.com/124434. |
| + EXPECT_CALL(statistics_cb_, OnStatistics(_)); |
| EXPECT_CALL(host_, SetError(PIPELINE_ERROR_DECODE)); |
| +#else |
| + EXPECT_CALL(host_, SetError(PIPELINE_ERROR_DECRYPT)); |
| +#endif |
| // Our read should still get satisfied with end of stream frame during an |
| // error. |