| Index: media/filters/pipeline_integration_test.cc
|
| diff --git a/media/filters/pipeline_integration_test.cc b/media/filters/pipeline_integration_test.cc
|
| index 2ad7b2ab51312910533908216a6f3aace4024c1d..c6b45428e7f696d8f4e7bd72ce124bdff3ed0648 100644
|
| --- a/media/filters/pipeline_integration_test.cc
|
| +++ b/media/filters/pipeline_integration_test.cc
|
| @@ -11,9 +11,11 @@
|
|
|
| namespace media {
|
|
|
| -// Key ID of the video track in test file "bear-320x240-encrypted.webm".
|
| -static const unsigned char kKeyId[] =
|
| - "\x11\xa5\x18\x37\xc4\x73\x84\x03\xe5\xe6\x57\xed\x8e\x06\xd9\x7c";
|
| +// Key used to encrypt video track in test file "bear-320x240-encrypted.webm".
|
| +static const unsigned char kKey[] = {
|
| + 0x5b, 0x4e, 0xe8, 0xb6, 0xd0, 0x7e, 0x4e, 0x58, 0xea, 0x24, 0x4c, 0x40, 0x13,
|
| + 0xfd, 0xb5, 0x2d
|
| +};
|
|
|
| static const char* kSourceId = "SourceId";
|
|
|
| @@ -36,10 +38,10 @@ class MockMediaSource : public ChunkDemuxerClient {
|
|
|
| virtual ~MockMediaSource() {}
|
|
|
| - void set_decryptor(AesDecryptor* decryptor) {
|
| + void set_decryptor(HmacAesDecryptor* decryptor) {
|
| decryptor_ = decryptor;
|
| }
|
| - AesDecryptor* decryptor() const {
|
| + HmacAesDecryptor* decryptor() const {
|
| return decryptor_;
|
| }
|
|
|
| @@ -97,12 +99,9 @@ class MockMediaSource : public ChunkDemuxerClient {
|
|
|
| virtual void KeyNeeded(scoped_array<uint8> init_data, int init_data_size) {
|
| DCHECK(init_data.get());
|
| - DCHECK_EQ(init_data_size, 16);
|
| DCHECK(decryptor());
|
| - // In test file bear-320x240-encrypted.webm, the decryption key is equal to
|
| - // |init_data|.
|
| decryptor()->AddKey(init_data.get(), init_data_size,
|
| - init_data.get(), init_data_size);
|
| + kKey, sizeof(kKey) - 1);
|
| }
|
|
|
| private:
|
| @@ -113,7 +112,7 @@ class MockMediaSource : public ChunkDemuxerClient {
|
| bool has_audio_;
|
| bool has_video_;
|
| scoped_refptr<ChunkDemuxer> chunk_demuxer_;
|
| - AesDecryptor* decryptor_;
|
| + HmacAesDecryptor* decryptor_;
|
| };
|
|
|
| class PipelineIntegrationTest
|
|
|