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

Unified Diff: media/filters/decrypting_audio_decoder_unittest.cc

Issue 17422002: Encrypted Media: DecryptingXxx::SetDecryptor() accepts NULL decryptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add todo and bug. Created 7 years, 6 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
« no previous file with comments | « media/filters/decrypting_audio_decoder.cc ('k') | media/filters/decrypting_demuxer_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d8b0a5e65fcf9f6c01511c8cad14807b4b138856..1ca19b88c9014b84a4386b09ab7cd3af866c10b9 100644
--- a/media/filters/decrypting_audio_decoder_unittest.cc
+++ b/media/filters/decrypting_audio_decoder_unittest.cc
@@ -270,6 +270,15 @@ TEST_F(DecryptingAudioDecoderTest, Initialize_UnsupportedAudioConfig) {
InitializeAndExpectStatus(config, DECODER_ERROR_NOT_SUPPORTED);
}
+TEST_F(DecryptingAudioDecoderTest, Initialize_NullDecryptor) {
+ EXPECT_CALL(*this, RequestDecryptorNotification(_))
+ .WillRepeatedly(RunCallbackIfNotNull(static_cast<Decryptor*>(NULL)));
+
+ AudioDecoderConfig config(kCodecVorbis, kSampleFormatPlanarF32,
+ CHANNEL_LAYOUT_STEREO, 44100, NULL, 0, true);
+ InitializeAndExpectStatus(config, DECODER_ERROR_NOT_SUPPORTED);
+}
+
// Test normal decrypt and decode case.
TEST_F(DecryptingAudioDecoderTest, DecryptAndDecode_Normal) {
Initialize();
« no previous file with comments | « media/filters/decrypting_audio_decoder.cc ('k') | media/filters/decrypting_demuxer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698