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

Unified Diff: media/filters/decrypting_demuxer_stream_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_demuxer_stream_unittest.cc
diff --git a/media/filters/decrypting_demuxer_stream_unittest.cc b/media/filters/decrypting_demuxer_stream_unittest.cc
index fa2a36cf947a69408c06dced673665c4fa41ff18..3cba1f72c3d26e85d066ac3e0aba598af1fe6451 100644
--- a/media/filters/decrypting_demuxer_stream_unittest.cc
+++ b/media/filters/decrypting_demuxer_stream_unittest.cc
@@ -77,7 +77,9 @@ class DecryptingDemuxerStreamTest : public testing::Test {
message_loop_.message_loop_proxy(),
base::Bind(
&DecryptingDemuxerStreamTest::RequestDecryptorNotification,
- base::Unretained(this)))),
+ base::Unretained(this)),
+ base::Bind(&DecryptingDemuxerStreamTest::OnWaitingForDecryptionKey,
+ base::Unretained(this)))),
decryptor_(new StrictMock<MockDecryptor>()),
is_decryptor_set_(false),
input_audio_stream_(
@@ -225,6 +227,7 @@ class DecryptingDemuxerStreamTest : public testing::Test {
EXPECT_CALL(*decryptor_, Decrypt(_, encrypted_buffer_, _))
.WillRepeatedly(RunCallback<2>(Decryptor::kNoKey,
scoped_refptr<DecoderBuffer>()));
+ EXPECT_CALL(*this, OnWaitingForDecryptionKey());
demuxer_stream_->Read(base::Bind(&DecryptingDemuxerStreamTest::BufferReady,
base::Unretained(this)));
message_loop_.RunUntilIdle();
@@ -260,6 +263,8 @@ class DecryptingDemuxerStreamTest : public testing::Test {
MOCK_METHOD1(DecryptorSet, void(bool));
+ MOCK_METHOD0(OnWaitingForDecryptionKey, void(void));
+
base::MessageLoop message_loop_;
scoped_ptr<DecryptingDemuxerStream> demuxer_stream_;
scoped_ptr<StrictMock<MockDecryptor> > decryptor_;

Powered by Google App Engine
This is Rietveld 408576698