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

Side by Side Diff: media/crypto/aes_decryptor_unittest.cc

Issue 17309003: Removed unused NeedKey callback from Decryptors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/crypto/aes_decryptor.cc ('k') | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "media/base/decoder_buffer.h" 10 #include "media/base/decoder_buffer.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 subsample_entries))); 223 subsample_entries)));
224 return encrypted_buffer; 224 return encrypted_buffer;
225 } 225 }
226 226
227 class AesDecryptorTest : public testing::Test { 227 class AesDecryptorTest : public testing::Test {
228 public: 228 public:
229 AesDecryptorTest() 229 AesDecryptorTest()
230 : decryptor_( 230 : decryptor_(
231 base::Bind(&AesDecryptorTest::KeyAdded, base::Unretained(this)), 231 base::Bind(&AesDecryptorTest::KeyAdded, base::Unretained(this)),
232 base::Bind(&AesDecryptorTest::KeyError, base::Unretained(this)), 232 base::Bind(&AesDecryptorTest::KeyError, base::Unretained(this)),
233 base::Bind(&AesDecryptorTest::KeyMessage, base::Unretained(this)), 233 base::Bind(&AesDecryptorTest::KeyMessage, base::Unretained(this))),
234 NeedKeyCB()),
235 decrypt_cb_(base::Bind(&AesDecryptorTest::BufferDecrypted, 234 decrypt_cb_(base::Bind(&AesDecryptorTest::BufferDecrypted,
236 base::Unretained(this))), 235 base::Unretained(this))),
237 subsample_entries_(kSubsampleEntries, 236 subsample_entries_(kSubsampleEntries,
238 kSubsampleEntries + arraysize(kSubsampleEntries)) { 237 kSubsampleEntries + arraysize(kSubsampleEntries)) {
239 } 238 }
240 239
241 protected: 240 protected:
242 void GenerateKeyRequest(const uint8* key_id, int key_id_size) { 241 void GenerateKeyRequest(const uint8* key_id, int key_id_size) {
243 std::string key_id_string(reinterpret_cast<const char*>(key_id), 242 std::string key_id_string(reinterpret_cast<const char*>(key_id),
244 key_id_size); 243 key_id_size);
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 scoped_refptr<DecoderBuffer> encrypted_data = CreateSubsampleEncryptedBuffer( 594 scoped_refptr<DecoderBuffer> encrypted_data = CreateSubsampleEncryptedBuffer(
596 kSubsampleData, arraysize(kSubsampleData), 595 kSubsampleData, arraysize(kSubsampleData),
597 kSubsampleKeyId, arraysize(kSubsampleKeyId), 596 kSubsampleKeyId, arraysize(kSubsampleKeyId),
598 kSubsampleIv, arraysize(kSubsampleIv), 597 kSubsampleIv, arraysize(kSubsampleIv),
599 0, 598 0,
600 entries); 599 entries);
601 ASSERT_NO_FATAL_FAILURE(DecryptAndExpectToFail(encrypted_data)); 600 ASSERT_NO_FATAL_FAILURE(DecryptAndExpectToFail(encrypted_data));
602 } 601 }
603 602
604 } // namespace media 603 } // namespace media
OLDNEW
« no previous file with comments | « media/crypto/aes_decryptor.cc ('k') | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698