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

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

Issue 2895573002: Reland of Remove ScopedVector from all other codes in media/ (Closed)
Patch Set: Fix the compile fails in build target "jpeg_decode_accelerator_unittest" Created 3 years, 7 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
« no previous file with comments | « media/cdm/aes_decryptor.cc ('k') | media/cdm/cdm_adapter.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/cdm/aes_decryptor.h" 5 #include "media/cdm/aes_decryptor.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 .Times(AtMost(1)); 380 .Times(AtMost(1));
381 381
382 cdm_->UpdateSession(session_id, 382 cdm_->UpdateSession(session_id,
383 std::vector<uint8_t>(key.begin(), key.end()), 383 std::vector<uint8_t>(key.begin(), key.end()),
384 CreatePromise(expected_result)); 384 CreatePromise(expected_result));
385 } 385 }
386 386
387 bool KeysInfoContains(const std::vector<uint8_t>& expected_key_id, 387 bool KeysInfoContains(const std::vector<uint8_t>& expected_key_id,
388 CdmKeyInformation::KeyStatus expected_status = 388 CdmKeyInformation::KeyStatus expected_status =
389 CdmKeyInformation::USABLE) { 389 CdmKeyInformation::USABLE) {
390 for (auto* key_id : cdm_client_.keys_info()) { 390 for (auto& key_id : cdm_client_.keys_info()) {
391 if (key_id->key_id == expected_key_id && 391 if (key_id->key_id == expected_key_id &&
392 key_id->status == expected_status) { 392 key_id->status == expected_status) {
393 return true; 393 return true;
394 } 394 }
395 } 395 }
396 return false; 396 return false;
397 } 397 }
398 398
399 MOCK_METHOD2(BufferDecrypted, void(Decryptor::Status, 399 MOCK_METHOD2(BufferDecrypted, void(Decryptor::Status,
400 const scoped_refptr<DecoderBuffer>&)); 400 const scoped_refptr<DecoderBuffer>&));
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 INSTANTIATE_TEST_CASE_P(CdmAdapter, 1052 INSTANTIATE_TEST_CASE_P(CdmAdapter,
1053 AesDecryptorTest, 1053 AesDecryptorTest,
1054 testing::Values("CdmAdapter")); 1054 testing::Values("CdmAdapter"));
1055 #endif 1055 #endif
1056 1056
1057 // TODO(jrummell): Once MojoCdm/MojoCdmService/MojoDecryptor/ 1057 // TODO(jrummell): Once MojoCdm/MojoCdmService/MojoDecryptor/
1058 // MojoDecryptorService are implemented, add a third version that tests the 1058 // MojoDecryptorService are implemented, add a third version that tests the
1059 // CDM via mojo. 1059 // CDM via mojo.
1060 1060
1061 } // namespace media 1061 } // namespace media
OLDNEW
« no previous file with comments | « media/cdm/aes_decryptor.cc ('k') | media/cdm/cdm_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698