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

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

Issue 2914273004: Add IsSupportedBitstreamAudioCodec() function in MediaClient. (Closed)
Patch Set: Fix one typo Created 3 years, 6 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 | « content/renderer/media/render_media_client.cc ('k') | media/base/media_client.h » ('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 // TODO(sandersd): Refactor to remove recomputed codec arrays, and generally 5 // TODO(sandersd): Refactor to remove recomputed codec arrays, and generally
6 // shorten and improve coverage. 6 // shorten and improve coverage.
7 // - http://crbug.com/417444 7 // - http://crbug.com/417444
8 // - http://crbug.com/457438 8 // - http://crbug.com/457438
9 // TODO(sandersd): Add tests to cover codec vectors with empty items. 9 // TODO(sandersd): Add tests to cover codec vectors with empty items.
10 // http://crbug.com/417461 10 // http://crbug.com/417461
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 public: 221 public:
222 TestMediaClient(); 222 TestMediaClient();
223 ~TestMediaClient() override; 223 ~TestMediaClient() override;
224 224
225 // MediaClient implementation. 225 // MediaClient implementation.
226 bool IsKeySystemsUpdateNeeded() final; 226 bool IsKeySystemsUpdateNeeded() final;
227 void AddSupportedKeySystems(std::vector<std::unique_ptr<KeySystemProperties>>* 227 void AddSupportedKeySystems(std::vector<std::unique_ptr<KeySystemProperties>>*
228 key_systems_properties) override; 228 key_systems_properties) override;
229 bool IsSupportedAudioConfig(const media::AudioConfig& config) final; 229 bool IsSupportedAudioConfig(const media::AudioConfig& config) final;
230 bool IsSupportedVideoConfig(const media::VideoConfig& config) final; 230 bool IsSupportedVideoConfig(const media::VideoConfig& config) final;
231 bool IsSupportedBitstreamAudioCodec(AudioCodec codec) final;
231 232
232 // Helper function to test the case where IsKeySystemsUpdateNeeded() is true 233 // Helper function to test the case where IsKeySystemsUpdateNeeded() is true
233 // after AddSupportedKeySystems() is called. 234 // after AddSupportedKeySystems() is called.
234 void SetKeySystemsUpdateNeeded(); 235 void SetKeySystemsUpdateNeeded();
235 236
236 // Helper function to disable "kExternal" key system support so that we can 237 // Helper function to disable "kExternal" key system support so that we can
237 // test the key system update case. 238 // test the key system update case.
238 void DisableExternalKeySystemSupport(); 239 void DisableExternalKeySystemSupport();
239 240
240 private: 241 private:
(...skipping 25 matching lines...) Expand all
266 } 267 }
267 268
268 bool TestMediaClient::IsSupportedAudioConfig(const media::AudioConfig& config) { 269 bool TestMediaClient::IsSupportedAudioConfig(const media::AudioConfig& config) {
269 return true; 270 return true;
270 } 271 }
271 272
272 bool TestMediaClient::IsSupportedVideoConfig(const media::VideoConfig& config) { 273 bool TestMediaClient::IsSupportedVideoConfig(const media::VideoConfig& config) {
273 return true; 274 return true;
274 } 275 }
275 276
277 bool TestMediaClient::IsSupportedBitstreamAudioCodec(AudioCodec codec) {
278 return false;
279 }
280
276 void TestMediaClient::SetKeySystemsUpdateNeeded() { 281 void TestMediaClient::SetKeySystemsUpdateNeeded() {
277 is_update_needed_ = true; 282 is_update_needed_ = true;
278 } 283 }
279 284
280 void TestMediaClient::DisableExternalKeySystemSupport() { 285 void TestMediaClient::DisableExternalKeySystemSupport() {
281 supports_external_key_system_ = false; 286 supports_external_key_system_ = false;
282 } 287 }
283 288
284 class KeySystemsTest : public testing::Test { 289 class KeySystemsTest : public testing::Test {
285 protected: 290 protected:
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 775
771 EXPECT_EQ(EmeConfigRule::HW_SECURE_CODECS_NOT_ALLOWED, 776 EXPECT_EQ(EmeConfigRule::HW_SECURE_CODECS_NOT_ALLOWED,
772 GetVideoContentTypeConfigRule(kVideoWebM, vp8_codec(), kExternal)); 777 GetVideoContentTypeConfigRule(kVideoWebM, vp8_codec(), kExternal));
773 EXPECT_EQ( 778 EXPECT_EQ(
774 EmeConfigRule::SUPPORTED, 779 EmeConfigRule::SUPPORTED,
775 GetVideoContentTypeConfigRule(kVideoFoo, foovideo_codec(), kExternal)); 780 GetVideoContentTypeConfigRule(kVideoFoo, foovideo_codec(), kExternal));
776 } 781 }
777 #endif 782 #endif
778 783
779 } // namespace media 784 } // namespace media
OLDNEW
« no previous file with comments | « content/renderer/media/render_media_client.cc ('k') | media/base/media_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698