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 #include <memory> | 5 #include <memory> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const char kExternalClearKeyFileIOTestKeySystem[] = | 60 const char kExternalClearKeyFileIOTestKeySystem[] = |
61 "org.chromium.externalclearkey.fileiotest"; | 61 "org.chromium.externalclearkey.fileiotest"; |
62 const char kExternalClearKeyInitializeFailKeySystem[] = | 62 const char kExternalClearKeyInitializeFailKeySystem[] = |
63 "org.chromium.externalclearkey.initializefail"; | 63 "org.chromium.externalclearkey.initializefail"; |
64 const char kExternalClearKeyOutputProtectionTestKeySystem[] = | 64 const char kExternalClearKeyOutputProtectionTestKeySystem[] = |
65 "org.chromium.externalclearkey.outputprotectiontest"; | 65 "org.chromium.externalclearkey.outputprotectiontest"; |
66 const char kExternalClearKeyPlatformVerificationTestKeySystem[] = | 66 const char kExternalClearKeyPlatformVerificationTestKeySystem[] = |
67 "org.chromium.externalclearkey.platformverificationtest"; | 67 "org.chromium.externalclearkey.platformverificationtest"; |
68 const char kExternalClearKeyCrashKeySystem[] = | 68 const char kExternalClearKeyCrashKeySystem[] = |
69 "org.chromium.externalclearkey.crash"; | 69 "org.chromium.externalclearkey.crash"; |
| 70 #if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION) |
70 const char kExternalClearKeyVerifyCdmHostTestKeySystem[] = | 71 const char kExternalClearKeyVerifyCdmHostTestKeySystem[] = |
71 "org.chromium.externalclearkey.verifycdmhosttest"; | 72 "org.chromium.externalclearkey.verifycdmhosttest"; |
| 73 #endif |
72 | 74 |
73 // Supported media types. | 75 // Supported media types. |
74 const char kWebMVorbisAudioOnly[] = "audio/webm; codecs=\"vorbis\""; | 76 const char kWebMVorbisAudioOnly[] = "audio/webm; codecs=\"vorbis\""; |
75 const char kWebMOpusAudioOnly[] = "audio/webm; codecs=\"opus\""; | 77 const char kWebMOpusAudioOnly[] = "audio/webm; codecs=\"opus\""; |
76 const char kWebMVP8VideoOnly[] = "video/webm; codecs=\"vp8\""; | 78 const char kWebMVP8VideoOnly[] = "video/webm; codecs=\"vp8\""; |
77 const char kWebMVorbisAudioVP8Video[] = "video/webm; codecs=\"vorbis, vp8\""; | 79 const char kWebMVorbisAudioVP8Video[] = "video/webm; codecs=\"vorbis, vp8\""; |
78 const char kWebMOpusAudioVP9Video[] = "video/webm; codecs=\"opus, vp9\""; | 80 const char kWebMOpusAudioVP9Video[] = "video/webm; codecs=\"opus, vp9\""; |
79 const char kWebMVP9VideoOnly[] = "video/webm; codecs=\"vp9\""; | 81 const char kWebMVP9VideoOnly[] = "video/webm; codecs=\"vp9\""; |
80 #if BUILDFLAG(USE_PROPRIETARY_CODECS) | 82 #if BUILDFLAG(USE_PROPRIETARY_CODECS) |
81 const char kMP4AudioOnly[] = "audio/mp4; codecs=\"mp4a.40.2\""; | 83 const char kMP4AudioOnly[] = "audio/mp4; codecs=\"mp4a.40.2\""; |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 } | 728 } |
727 | 729 |
728 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadLoadableSession) { | 730 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadLoadableSession) { |
729 TestPlaybackCase(kExternalClearKeyKeySystem, kLoadableSession, kEnded); | 731 TestPlaybackCase(kExternalClearKeyKeySystem, kLoadableSession, kEnded); |
730 } | 732 } |
731 | 733 |
732 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadUnknownSession) { | 734 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadUnknownSession) { |
733 TestPlaybackCase(kExternalClearKeyKeySystem, kUnknownSession, | 735 TestPlaybackCase(kExternalClearKeyKeySystem, kUnknownSession, |
734 kEmeSessionNotFound); | 736 kEmeSessionNotFound); |
735 } | 737 } |
| 738 #endif // BUILDFLAG(ENABLE_PEPPER_CDMS) |
736 | 739 |
| 740 #if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION) |
737 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, VerifyCdmHostTest) { | 741 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, VerifyCdmHostTest) { |
738 TestNonPlaybackCases(kExternalClearKeyVerifyCdmHostTestKeySystem, | 742 TestNonPlaybackCases(kExternalClearKeyVerifyCdmHostTestKeySystem, |
739 kUnitTestSuccess); | 743 kUnitTestSuccess); |
740 } | 744 } |
741 | 745 #endif // BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION) |
742 #endif // BUILDFLAG(ENABLE_PEPPER_CDMS) | |
743 | 746 |
744 } // namespace chrome | 747 } // namespace chrome |
OLD | NEW |