OLD | NEW |
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 } else { | 379 } else { |
380 EXPECT_CALL(*this, OnSessionKeysChangeCalled(_, _)).Times(0); | 380 EXPECT_CALL(*this, OnSessionKeysChangeCalled(_, _)).Times(0); |
381 } | 381 } |
382 | 382 |
383 cdm_->UpdateSession(session_id, | 383 cdm_->UpdateSession(session_id, |
384 std::vector<uint8_t>(key.begin(), key.end()), | 384 std::vector<uint8_t>(key.begin(), key.end()), |
385 CreatePromise(expected_result)); | 385 CreatePromise(expected_result)); |
386 } | 386 } |
387 | 387 |
388 bool KeysInfoContains(std::vector<uint8_t> expected) { | 388 bool KeysInfoContains(std::vector<uint8_t> expected) { |
389 for (const auto& key_id : keys_info_) { | 389 for (auto* key_id : keys_info_) { |
390 if (key_id->key_id == expected) | 390 if (key_id->key_id == expected) |
391 return true; | 391 return true; |
392 } | 392 } |
393 return false; | 393 return false; |
394 } | 394 } |
395 | 395 |
396 MOCK_METHOD2(BufferDecrypted, void(Decryptor::Status, | 396 MOCK_METHOD2(BufferDecrypted, void(Decryptor::Status, |
397 const scoped_refptr<DecoderBuffer>&)); | 397 const scoped_refptr<DecoderBuffer>&)); |
398 | 398 |
399 enum DecryptExpectation { | 399 enum DecryptExpectation { |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 INSTANTIATE_TEST_CASE_P(CdmAdapter, | 1021 INSTANTIATE_TEST_CASE_P(CdmAdapter, |
1022 AesDecryptorTest, | 1022 AesDecryptorTest, |
1023 testing::Values("CdmAdapter")); | 1023 testing::Values("CdmAdapter")); |
1024 #endif | 1024 #endif |
1025 | 1025 |
1026 // TODO(jrummell): Once MojoCdm/MojoCdmService/MojoDecryptor/ | 1026 // TODO(jrummell): Once MojoCdm/MojoCdmService/MojoDecryptor/ |
1027 // MojoDecryptorService are implemented, add a third version that tests the | 1027 // MojoDecryptorService are implemented, add a third version that tests the |
1028 // CDM via mojo. | 1028 // CDM via mojo. |
1029 | 1029 |
1030 } // namespace media | 1030 } // namespace media |
OLD | NEW |