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

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

Issue 2409423002: Move ENABLE_PEPPER_CDMS to a buildflag header. (Closed)
Patch Set: Fix and format 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"
30 #include "testing/gmock/include/gmock/gmock.h" 31 #include "testing/gmock/include/gmock/gmock.h"
31 #include "testing/gtest/include/gtest/gtest-param-test.h" 32 #include "testing/gtest/include/gtest/gtest-param-test.h"
32 #include "testing/gtest/include/gtest/gtest.h" 33 #include "testing/gtest/include/gtest/gtest.h"
33 #include "url/gurl.h" 34 #include "url/gurl.h"
34 35
35 using ::testing::_; 36 using ::testing::_;
36 using ::testing::Gt; 37 using ::testing::Gt;
37 using ::testing::IsNull; 38 using ::testing::IsNull;
38 using ::testing::NotNull; 39 using ::testing::NotNull;
39 using ::testing::SaveArg; 40 using ::testing::SaveArg;
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 1014
1014 // 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.
1015 std::string session_id2 = CreateSession(key_id_); 1016 std::string session_id2 = CreateSession(key_id_);
1016 UpdateSessionAndExpect(session_id2, kKeyAsJWK, RESOLVED, true); 1017 UpdateSessionAndExpect(session_id2, kKeyAsJWK, RESOLVED, true);
1017 } 1018 }
1018 1019
1019 INSTANTIATE_TEST_CASE_P(AesDecryptor, 1020 INSTANTIATE_TEST_CASE_P(AesDecryptor,
1020 AesDecryptorTest, 1021 AesDecryptorTest,
1021 testing::Values("AesDecryptor")); 1022 testing::Values("AesDecryptor"));
1022 1023
1023 #if defined(ENABLE_PEPPER_CDMS) 1024 #if BUILDFLAG(ENABLE_PEPPER_CDMS)
1024 INSTANTIATE_TEST_CASE_P(CdmAdapter, 1025 INSTANTIATE_TEST_CASE_P(CdmAdapter,
1025 AesDecryptorTest, 1026 AesDecryptorTest,
1026 testing::Values("CdmAdapter")); 1027 testing::Values("CdmAdapter"));
1027 #endif 1028 #endif
1028 1029
1029 // TODO(jrummell): Once MojoCdm/MojoCdmService/MojoDecryptor/ 1030 // TODO(jrummell): Once MojoCdm/MojoCdmService/MojoDecryptor/
1030 // MojoDecryptorService are implemented, add a third version that tests the 1031 // MojoDecryptorService are implemented, add a third version that tests the
1031 // CDM via mojo. 1032 // CDM via mojo.
1032 1033
1033 } // 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