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

Unified Diff: media/filters/pipeline_integration_test.cc

Issue 77413005: Remove support for non-JSON keys in AesDecryptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add pipeline_integration_tests Created 7 years, 1 month 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/cdm/aes_decryptor_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/pipeline_integration_test.cc
diff --git a/media/filters/pipeline_integration_test.cc b/media/filters/pipeline_integration_test.cc
index 86692979f027ae7ed1adab695a49eb12e9481577..1b96bdb4f06830b33451987212629225bf23f6a7 100644
--- a/media/filters/pipeline_integration_test.cc
+++ b/media/filters/pipeline_integration_test.cc
@@ -14,6 +14,7 @@
#include "media/base/media_switches.h"
#include "media/base/test_data_util.h"
#include "media/cdm/aes_decryptor.h"
+#include "media/cdm/json_web_key.h"
#include "media/filters/chunk_demuxer.h"
using testing::AnyNumber;
@@ -189,9 +190,12 @@ class KeyProvidingApp : public FakeEncryptedMedia::AppBase {
key_id_length = arraysize(kKeyId);
}
+ // Convert key into a JSON structure and then add it.
+ std::string jwk = GenerateJWKSet(
+ kSecretKey, arraysize(kSecretKey), key_id, key_id_length);
decryptor->AddKey(current_reference_id_,
- kSecretKey, arraysize(kSecretKey),
- key_id, key_id_length);
+ reinterpret_cast<const uint8*>(jwk.data()), jwk.size(),
+ NULL, 0);
}
uint32 current_reference_id_;
« no previous file with comments | « media/cdm/aes_decryptor_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698