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

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

Issue 2412493003: Revert of Move ENABLE_PEPPER_CDMS to a buildflag header. (Closed)
Patch Set: Created 4 years, 2 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/blink/webcontentdecryptionmodule_impl.h ('k') | ppapi/BUILD.gn » ('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>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/debug/leak_annotations.h" 13 #include "base/debug/leak_annotations.h"
14 #include "base/json/json_reader.h" 14 #include "base/json/json_reader.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/run_loop.h" 16 #include "base/run_loop.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "media/base/cdm_callback_promise.h" 18 #include "media/base/cdm_callback_promise.h"
19 #include "media/base/cdm_config.h" 19 #include "media/base/cdm_config.h"
20 #include "media/base/cdm_key_information.h" 20 #include "media/base/cdm_key_information.h"
21 #include "media/base/decoder_buffer.h" 21 #include "media/base/decoder_buffer.h"
22 #include "media/base/decrypt_config.h" 22 #include "media/base/decrypt_config.h"
23 #include "media/base/decryptor.h" 23 #include "media/base/decryptor.h"
24 #include "media/base/mock_filters.h" 24 #include "media/base/mock_filters.h"
25 #include "media/cdm/api/content_decryption_module.h" 25 #include "media/cdm/api/content_decryption_module.h"
26 #include "media/cdm/cdm_adapter.h" 26 #include "media/cdm/cdm_adapter.h"
27 #include "media/cdm/cdm_file_io.h" 27 #include "media/cdm/cdm_file_io.h"
28 #include "media/cdm/external_clear_key_test_helper.h" 28 #include "media/cdm/external_clear_key_test_helper.h"
29 #include "media/cdm/simple_cdm_allocator.h" 29 #include "media/cdm/simple_cdm_allocator.h"
30 #include "ppapi/features/features.h"
31 #include "testing/gmock/include/gmock/gmock.h" 30 #include "testing/gmock/include/gmock/gmock.h"
32 #include "testing/gtest/include/gtest/gtest-param-test.h" 31 #include "testing/gtest/include/gtest/gtest-param-test.h"
33 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
34 #include "url/gurl.h" 33 #include "url/gurl.h"
35 34
36 using ::testing::_; 35 using ::testing::_;
37 using ::testing::Gt; 36 using ::testing::Gt;
38 using ::testing::IsNull; 37 using ::testing::IsNull;
39 using ::testing::NotNull; 38 using ::testing::NotNull;
40 using ::testing::SaveArg; 39 using ::testing::SaveArg;
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 1014
1016 // Create a new session. Add key, should indicate key added for this session. 1015 // Create a new session. Add key, should indicate key added for this session.
1017 std::string session_id2 = CreateSession(key_id_); 1016 std::string session_id2 = CreateSession(key_id_);
1018 UpdateSessionAndExpect(session_id2, kKeyAsJWK, RESOLVED, true); 1017 UpdateSessionAndExpect(session_id2, kKeyAsJWK, RESOLVED, true);
1019 } 1018 }
1020 1019
1021 INSTANTIATE_TEST_CASE_P(AesDecryptor, 1020 INSTANTIATE_TEST_CASE_P(AesDecryptor,
1022 AesDecryptorTest, 1021 AesDecryptorTest,
1023 testing::Values("AesDecryptor")); 1022 testing::Values("AesDecryptor"));
1024 1023
1025 #if BUILDFLAG(ENABLE_PEPPER_CDMS) 1024 #if defined(ENABLE_PEPPER_CDMS)
1026 INSTANTIATE_TEST_CASE_P(CdmAdapter, 1025 INSTANTIATE_TEST_CASE_P(CdmAdapter,
1027 AesDecryptorTest, 1026 AesDecryptorTest,
1028 testing::Values("CdmAdapter")); 1027 testing::Values("CdmAdapter"));
1029 #endif 1028 #endif
1030 1029
1031 // TODO(jrummell): Once MojoCdm/MojoCdmService/MojoDecryptor/ 1030 // TODO(jrummell): Once MojoCdm/MojoCdmService/MojoDecryptor/
1032 // MojoDecryptorService are implemented, add a third version that tests the 1031 // MojoDecryptorService are implemented, add a third version that tests the
1033 // CDM via mojo. 1032 // CDM via mojo.
1034 1033
1035 } // namespace media 1034 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webcontentdecryptionmodule_impl.h ('k') | ppapi/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698