Index: media/filters/decrypting_audio_decoder_unittest.cc |
diff --git a/media/filters/decrypting_audio_decoder_unittest.cc b/media/filters/decrypting_audio_decoder_unittest.cc |
index 49df3ce6f052b3b3dbd6305bfd8c89662522ad17..59ffa66aef557ce473b7d94300e7881862279cd1 100644 |
--- a/media/filters/decrypting_audio_decoder_unittest.cc |
+++ b/media/filters/decrypting_audio_decoder_unittest.cc |
@@ -92,9 +92,12 @@ class DecryptingAudioDecoderTest : public testing::Test { |
kNoTimestamp()); |
decoded_frame_list_.push_back(decoded_frame_); |
- decoder_->Initialize(config, NewExpectedStatusCB(status), |
- base::Bind(&DecryptingAudioDecoderTest::FrameReady, |
- base::Unretained(this))); |
+ decoder_->Initialize( |
+ config, NewExpectedStatusCB(status), |
+ base::Bind(&DecryptingAudioDecoderTest::FrameReady, |
+ base::Unretained(this)), |
+ base::Bind(&DecryptingAudioDecoderTest::OnWaitingForEncryptionKey, |
+ base::Unretained(this))); |
message_loop_.RunUntilIdle(); |
} |
@@ -130,9 +133,12 @@ class DecryptingAudioDecoderTest : public testing::Test { |
.WillOnce(RunCallback<1>(true)); |
EXPECT_CALL(*decryptor_, RegisterNewKeyCB(Decryptor::kAudio, _)) |
.WillOnce(SaveArg<1>(&key_added_cb_)); |
- decoder_->Initialize(new_config, NewExpectedStatusCB(PIPELINE_OK), |
- base::Bind(&DecryptingAudioDecoderTest::FrameReady, |
- base::Unretained(this))); |
+ decoder_->Initialize( |
+ new_config, NewExpectedStatusCB(PIPELINE_OK), |
+ base::Bind(&DecryptingAudioDecoderTest::FrameReady, |
+ base::Unretained(this)), |
+ base::Bind(&DecryptingAudioDecoderTest::OnWaitingForEncryptionKey, |
+ base::Unretained(this))); |
} |
// Decode |buffer| and expect DecodeDone to get called with |status|. |
@@ -204,6 +210,7 @@ class DecryptingAudioDecoderTest : public testing::Test { |
EXPECT_CALL(*decryptor_, DecryptAndDecodeAudio(encrypted_buffer_, _)) |
.WillRepeatedly(RunCallback<1>(Decryptor::kNoKey, |
Decryptor::AudioFrames())); |
+ EXPECT_CALL(*this, OnWaitingForEncryptionKey()); |
decoder_->Decode(encrypted_buffer_, |
base::Bind(&DecryptingAudioDecoderTest::DecodeDone, |
base::Unretained(this))); |
@@ -252,6 +259,8 @@ class DecryptingAudioDecoderTest : public testing::Test { |
MOCK_METHOD1(DecryptorSet, void(bool)); |
+ MOCK_METHOD0(OnWaitingForEncryptionKey, void(void)); |
+ |
base::MessageLoop message_loop_; |
scoped_ptr<DecryptingAudioDecoder> decoder_; |
scoped_ptr<StrictMock<MockDecryptor> > decryptor_; |