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

Unified Diff: media/crypto/aes_decryptor_unittest.cc

Issue 10822026: Implement "Key Presence" step in "Encrypted Block Encounted" algorithm in EME. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 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/crypto/aes_decryptor.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/crypto/aes_decryptor_unittest.cc
diff --git a/media/crypto/aes_decryptor_unittest.cc b/media/crypto/aes_decryptor_unittest.cc
index ab314de71275a0089e5a7c8fb0425c01599d0106..c9d82c2e62d0d1ad93f47037e40bfd50b0e9e1fe 100644
--- a/media/crypto/aes_decryptor_unittest.cc
+++ b/media/crypto/aes_decryptor_unittest.cc
@@ -346,6 +346,17 @@ TEST_F(AesDecryptorTest, WrongKey) {
ASSERT_NO_FATAL_FAILURE(DecryptAndExpectToFail(encrypted_data));
}
+TEST_F(AesDecryptorTest, NoKey) {
+ const WebmEncryptedData& frame = kWebmEncryptedFrames[0];
+ GenerateKeyRequest(frame.key_id, frame.key_id_size);
+
+ scoped_refptr<DecoderBuffer> encrypted_data =
+ CreateWebMEncryptedBuffer(frame.encrypted_data, frame.encrypted_data_size,
+ frame.key_id, frame.key_id_size);
+ EXPECT_CALL(*this, BufferDecrypted(AesDecryptor::kNoKey, IsNull()));
+ decryptor_.Decrypt(encrypted_data, decrypt_cb_);
+}
+
TEST_F(AesDecryptorTest, KeyReplacement) {
const WebmEncryptedData& frame = kWebmEncryptedFrames[0];
GenerateKeyRequest(frame.key_id, frame.key_id_size);
« no previous file with comments | « media/crypto/aes_decryptor.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698