Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 // Therefore, SetMediaClient() must be called before this function to make sure | 85 // Therefore, SetMediaClient() must be called before this function to make sure |
| 86 // MediaClient in effect when constructing KeySystems. | 86 // MediaClient in effect when constructing KeySystems. |
| 87 static void AddContainerAndCodecMasksForTest() { | 87 static void AddContainerAndCodecMasksForTest() { |
| 88 // Since KeySystems is a singleton. Make sure we only add test container and | 88 // Since KeySystems is a singleton. Make sure we only add test container and |
| 89 // codec masks once per process. | 89 // codec masks once per process. |
| 90 static bool is_test_masks_added = false; | 90 static bool is_test_masks_added = false; |
| 91 | 91 |
| 92 if (is_test_masks_added) | 92 if (is_test_masks_added) |
| 93 return; | 93 return; |
| 94 | 94 |
| 95 AddContainerMask("audio/foo", TEST_CODEC_FOO_AUDIO_ALL); | |
| 96 AddContainerMask("video/foo", TEST_CODEC_FOO_ALL); | |
| 97 AddCodecMask(EmeMediaType::AUDIO, "fooaudio", TEST_CODEC_FOO_AUDIO); | 95 AddCodecMask(EmeMediaType::AUDIO, "fooaudio", TEST_CODEC_FOO_AUDIO); |
| 98 AddCodecMask(EmeMediaType::VIDEO, "foovideo", TEST_CODEC_FOO_VIDEO); | 96 AddCodecMask(EmeMediaType::VIDEO, "foovideo", TEST_CODEC_FOO_VIDEO); |
| 97 AddMimeTypeCodecMask("audio/foo", TEST_CODEC_FOO_AUDIO_ALL); | |
| 98 AddMimeTypeCodecMask("video/foo", TEST_CODEC_FOO_VIDEO_ALL); | |
|
ddorwin
2016/02/25 00:10:48
Moved, renamed, and added "_VIDEO" to the paramete
| |
| 99 | 99 |
| 100 is_test_masks_added = true; | 100 is_test_masks_added = true; |
| 101 } | 101 } |
| 102 | 102 |
| 103 class TestMediaClient : public MediaClient { | 103 class TestMediaClient : public MediaClient { |
| 104 public: | 104 public: |
| 105 TestMediaClient(); | 105 TestMediaClient(); |
| 106 ~TestMediaClient() override; | 106 ~TestMediaClient() override; |
| 107 | 107 |
| 108 // MediaClient implementation. | 108 // MediaClient implementation. |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 752 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.something.else")); | 752 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.something.else")); |
| 753 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.other")); | 753 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.other")); |
| 754 | 754 |
| 755 EXPECT_FALSE(IsSupportedKeySystem("x-")); | 755 EXPECT_FALSE(IsSupportedKeySystem("x-")); |
| 756 EXPECT_TRUE(IsSupportedKeySystem("x-something")); | 756 EXPECT_TRUE(IsSupportedKeySystem("x-something")); |
| 757 EXPECT_FALSE(IsSupportedKeySystem("x-something.else")); | 757 EXPECT_FALSE(IsSupportedKeySystem("x-something.else")); |
| 758 EXPECT_FALSE(IsSupportedKeySystem("x-other")); | 758 EXPECT_FALSE(IsSupportedKeySystem("x-other")); |
| 759 } | 759 } |
| 760 | 760 |
| 761 } // namespace media | 761 } // namespace media |
| OLD | NEW |