Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1266)

Unified Diff: media/filters/decrypting_audio_decoder_unittest.cc

Issue 935243002: Decryptors can report kNoKey to WebMediaPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android changes Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..1f8395bf53a7173b11c65c3333351bd5afb5b37b 100644
--- a/media/filters/decrypting_audio_decoder_unittest.cc
+++ b/media/filters/decrypting_audio_decoder_unittest.cc
@@ -63,7 +63,9 @@ class DecryptingAudioDecoderTest : public testing::Test {
message_loop_.message_loop_proxy(),
base::Bind(
&DecryptingAudioDecoderTest::RequestDecryptorNotification,
- base::Unretained(this)))),
+ base::Unretained(this)),
+ base::Bind(&DecryptingAudioDecoderTest::OnWaitingForDecryptionKey,
+ base::Unretained(this)))),
decryptor_(new StrictMock<MockDecryptor>()),
num_decrypt_and_decode_calls_(0),
num_frames_in_decryptor_(0),
@@ -204,6 +206,7 @@ class DecryptingAudioDecoderTest : public testing::Test {
EXPECT_CALL(*decryptor_, DecryptAndDecodeAudio(encrypted_buffer_, _))
.WillRepeatedly(RunCallback<1>(Decryptor::kNoKey,
Decryptor::AudioFrames()));
+ EXPECT_CALL(*this, OnWaitingForDecryptionKey());
decoder_->Decode(encrypted_buffer_,
base::Bind(&DecryptingAudioDecoderTest::DecodeDone,
base::Unretained(this)));
@@ -252,6 +255,8 @@ class DecryptingAudioDecoderTest : public testing::Test {
MOCK_METHOD1(DecryptorSet, void(bool));
+ MOCK_METHOD0(OnWaitingForDecryptionKey, void(void));
+
base::MessageLoop message_loop_;
scoped_ptr<DecryptingAudioDecoder> decoder_;
scoped_ptr<StrictMock<MockDecryptor> > decryptor_;

Powered by Google App Engine
This is Rietveld 408576698