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

Side by Side Diff: media/base/key_systems_unittest.cc

Issue 1027363002: Change EmeInitDataType to be an enum class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 9 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/base/key_systems.cc ('k') | no next file » | 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "media/base/eme_constants.h" 9 #include "media/base/eme_constants.h"
10 #include "media/base/key_system_info.h" 10 #include "media/base/key_system_info.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 supports_external_key_system_ = false; 158 supports_external_key_system_ = false;
159 } 159 }
160 160
161 void TestMediaClient::AddUsesAesKeySystem( 161 void TestMediaClient::AddUsesAesKeySystem(
162 const std::string& name, 162 const std::string& name,
163 std::vector<KeySystemInfo>* key_systems) { 163 std::vector<KeySystemInfo>* key_systems) {
164 KeySystemInfo system; 164 KeySystemInfo system;
165 system.key_system = name; 165 system.key_system = name;
166 system.supported_codecs = EME_CODEC_WEBM_ALL; 166 system.supported_codecs = EME_CODEC_WEBM_ALL;
167 system.supported_codecs |= TEST_CODEC_FOO_ALL; 167 system.supported_codecs |= TEST_CODEC_FOO_ALL;
168 system.supported_init_data_types = EME_INIT_DATA_TYPE_WEBM; 168 system.supported_init_data_types = kInitDataTypeMaskWebM;
169 system.max_audio_robustness = EmeRobustness::EMPTY; 169 system.max_audio_robustness = EmeRobustness::EMPTY;
170 system.max_video_robustness = EmeRobustness::EMPTY; 170 system.max_video_robustness = EmeRobustness::EMPTY;
171 system.persistent_license_support = EME_SESSION_TYPE_NOT_SUPPORTED; 171 system.persistent_license_support = EME_SESSION_TYPE_NOT_SUPPORTED;
172 system.persistent_release_message_support = EME_SESSION_TYPE_NOT_SUPPORTED; 172 system.persistent_release_message_support = EME_SESSION_TYPE_NOT_SUPPORTED;
173 system.persistent_state_support = EME_FEATURE_NOT_SUPPORTED; 173 system.persistent_state_support = EME_FEATURE_NOT_SUPPORTED;
174 system.distinctive_identifier_support = EME_FEATURE_NOT_SUPPORTED; 174 system.distinctive_identifier_support = EME_FEATURE_NOT_SUPPORTED;
175 system.use_aes_decryptor = true; 175 system.use_aes_decryptor = true;
176 key_systems->push_back(system); 176 key_systems->push_back(system);
177 } 177 }
178 178
179 void TestMediaClient::AddExternalKeySystem( 179 void TestMediaClient::AddExternalKeySystem(
180 std::vector<KeySystemInfo>* key_systems) { 180 std::vector<KeySystemInfo>* key_systems) {
181 KeySystemInfo ext; 181 KeySystemInfo ext;
182 ext.key_system = kExternal; 182 ext.key_system = kExternal;
183 ext.supported_codecs = EME_CODEC_WEBM_ALL; 183 ext.supported_codecs = EME_CODEC_WEBM_ALL;
184 ext.supported_codecs |= TEST_CODEC_FOO_ALL; 184 ext.supported_codecs |= TEST_CODEC_FOO_ALL;
185 ext.supported_init_data_types = EME_INIT_DATA_TYPE_WEBM; 185 ext.supported_init_data_types = kInitDataTypeMaskWebM;
186 ext.max_audio_robustness = EmeRobustness::EMPTY; 186 ext.max_audio_robustness = EmeRobustness::EMPTY;
187 ext.max_video_robustness = EmeRobustness::EMPTY; 187 ext.max_video_robustness = EmeRobustness::EMPTY;
188 ext.persistent_license_support = EME_SESSION_TYPE_SUPPORTED; 188 ext.persistent_license_support = EME_SESSION_TYPE_SUPPORTED;
189 ext.persistent_release_message_support = EME_SESSION_TYPE_NOT_SUPPORTED; 189 ext.persistent_release_message_support = EME_SESSION_TYPE_NOT_SUPPORTED;
190 ext.persistent_state_support = EME_FEATURE_ALWAYS_ENABLED; 190 ext.persistent_state_support = EME_FEATURE_ALWAYS_ENABLED;
191 ext.distinctive_identifier_support = EME_FEATURE_ALWAYS_ENABLED; 191 ext.distinctive_identifier_support = EME_FEATURE_ALWAYS_ENABLED;
192 ext.parent_key_system = kExternalParent; 192 ext.parent_key_system = kExternalParent;
193 #if defined(ENABLE_PEPPER_CDMS) 193 #if defined(ENABLE_PEPPER_CDMS)
194 ext.pepper_type = "application/x-ppapi-external-cdm"; 194 ext.pepper_type = "application/x-ppapi-external-cdm";
195 #endif // defined(ENABLE_PEPPER_CDMS) 195 #endif // defined(ENABLE_PEPPER_CDMS)
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.something.else")); 869 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.something.else"));
870 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.other")); 870 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.other"));
871 871
872 EXPECT_FALSE(IsSupportedKeySystem("x-")); 872 EXPECT_FALSE(IsSupportedKeySystem("x-"));
873 EXPECT_TRUE(IsSupportedKeySystem("x-something")); 873 EXPECT_TRUE(IsSupportedKeySystem("x-something"));
874 EXPECT_FALSE(IsSupportedKeySystem("x-something.else")); 874 EXPECT_FALSE(IsSupportedKeySystem("x-something.else"));
875 EXPECT_FALSE(IsSupportedKeySystem("x-other")); 875 EXPECT_FALSE(IsSupportedKeySystem("x-other"));
876 } 876 }
877 877
878 } // namespace media 878 } // namespace media
OLDNEW
« no previous file with comments | « media/base/key_systems.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698