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

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: 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
« media/base/key_systems.cc ('K') | « 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 = kSupportedInitDataTypeWebM;
169 system.persistent_license_support = EME_SESSION_TYPE_NOT_SUPPORTED; 169 system.persistent_license_support = EME_SESSION_TYPE_NOT_SUPPORTED;
170 system.persistent_release_message_support = EME_SESSION_TYPE_NOT_SUPPORTED; 170 system.persistent_release_message_support = EME_SESSION_TYPE_NOT_SUPPORTED;
171 system.persistent_state_support = EME_FEATURE_NOT_SUPPORTED; 171 system.persistent_state_support = EME_FEATURE_NOT_SUPPORTED;
172 system.distinctive_identifier_support = EME_FEATURE_NOT_SUPPORTED; 172 system.distinctive_identifier_support = EME_FEATURE_NOT_SUPPORTED;
173 system.use_aes_decryptor = true; 173 system.use_aes_decryptor = true;
174 key_systems->push_back(system); 174 key_systems->push_back(system);
175 } 175 }
176 176
177 void TestMediaClient::AddExternalKeySystem( 177 void TestMediaClient::AddExternalKeySystem(
178 std::vector<KeySystemInfo>* key_systems) { 178 std::vector<KeySystemInfo>* key_systems) {
179 KeySystemInfo ext; 179 KeySystemInfo ext;
180 ext.key_system = kExternal; 180 ext.key_system = kExternal;
181 ext.supported_codecs = EME_CODEC_WEBM_ALL; 181 ext.supported_codecs = EME_CODEC_WEBM_ALL;
182 ext.supported_codecs |= TEST_CODEC_FOO_ALL; 182 ext.supported_codecs |= TEST_CODEC_FOO_ALL;
183 ext.supported_init_data_types = EME_INIT_DATA_TYPE_WEBM; 183 ext.supported_init_data_types = kSupportedInitDataTypeWebM;
184 ext.persistent_license_support = EME_SESSION_TYPE_SUPPORTED; 184 ext.persistent_license_support = EME_SESSION_TYPE_SUPPORTED;
185 ext.persistent_release_message_support = EME_SESSION_TYPE_NOT_SUPPORTED; 185 ext.persistent_release_message_support = EME_SESSION_TYPE_NOT_SUPPORTED;
186 ext.persistent_state_support = EME_FEATURE_ALWAYS_ENABLED; 186 ext.persistent_state_support = EME_FEATURE_ALWAYS_ENABLED;
187 ext.distinctive_identifier_support = EME_FEATURE_ALWAYS_ENABLED; 187 ext.distinctive_identifier_support = EME_FEATURE_ALWAYS_ENABLED;
188 ext.parent_key_system = kExternalParent; 188 ext.parent_key_system = kExternalParent;
189 #if defined(ENABLE_PEPPER_CDMS) 189 #if defined(ENABLE_PEPPER_CDMS)
190 ext.pepper_type = "application/x-ppapi-external-cdm"; 190 ext.pepper_type = "application/x-ppapi-external-cdm";
191 #endif // defined(ENABLE_PEPPER_CDMS) 191 #endif // defined(ENABLE_PEPPER_CDMS)
192 key_systems->push_back(ext); 192 key_systems->push_back(ext);
193 } 193 }
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.something.else")); 865 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.something.else"));
866 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.other")); 866 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.other"));
867 867
868 EXPECT_FALSE(IsSupportedKeySystem("x-")); 868 EXPECT_FALSE(IsSupportedKeySystem("x-"));
869 EXPECT_TRUE(IsSupportedKeySystem("x-something")); 869 EXPECT_TRUE(IsSupportedKeySystem("x-something"));
870 EXPECT_FALSE(IsSupportedKeySystem("x-something.else")); 870 EXPECT_FALSE(IsSupportedKeySystem("x-something.else"));
871 EXPECT_FALSE(IsSupportedKeySystem("x-other")); 871 EXPECT_FALSE(IsSupportedKeySystem("x-other"));
872 } 872 }
873 873
874 } // namespace media 874 } // namespace media
OLDNEW
« media/base/key_systems.cc ('K') | « media/base/key_systems.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698