| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
| 10 #include "chrome/browser/media/media_browsertest.h" | 10 #include "chrome/browser/media/media_browsertest.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 "libclearkeycdmadapter.so"; | 32 "libclearkeycdmadapter.so"; |
| 33 #endif | 33 #endif |
| 34 | 34 |
| 35 const char kClearKeyCdmPluginMimeType[] = "application/x-ppapi-clearkey-cdm"; | 35 const char kClearKeyCdmPluginMimeType[] = "application/x-ppapi-clearkey-cdm"; |
| 36 #endif // defined(ENABLE_PEPPER_CDMS) | 36 #endif // defined(ENABLE_PEPPER_CDMS) |
| 37 | 37 |
| 38 // Available key systems. | 38 // Available key systems. |
| 39 const char kClearKeyKeySystem[] = "org.w3.clearkey"; | 39 const char kClearKeyKeySystem[] = "org.w3.clearkey"; |
| 40 const char kPrefixedClearKeyKeySystem[] = "webkit-org.w3.clearkey"; | 40 const char kPrefixedClearKeyKeySystem[] = "webkit-org.w3.clearkey"; |
| 41 const char kExternalClearKeyKeySystem[] = "org.chromium.externalclearkey"; | 41 const char kExternalClearKeyKeySystem[] = "org.chromium.externalclearkey"; |
| 42 const char kExternalClearKeyDecryptOnlyKeySystem[] = | |
| 43 "org.chromium.externalclearkey.decryptonly"; | |
| 44 const char kExternalClearKeyFileIOTestKeySystem[] = | 42 const char kExternalClearKeyFileIOTestKeySystem[] = |
| 45 "org.chromium.externalclearkey.fileiotest"; | 43 "org.chromium.externalclearkey.fileiotest"; |
| 46 const char kExternalClearKeyInitializeFailKeySystem[] = | 44 const char kExternalClearKeyInitializeFailKeySystem[] = |
| 47 "org.chromium.externalclearkey.initializefail"; | 45 "org.chromium.externalclearkey.initializefail"; |
| 48 const char kExternalClearKeyCrashKeySystem[] = | 46 const char kExternalClearKeyCrashKeySystem[] = |
| 49 "org.chromium.externalclearkey.crash"; | 47 "org.chromium.externalclearkey.crash"; |
| 50 | 48 |
| 51 // Supported media types. | 49 // Supported media types. |
| 52 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\""; | 50 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\""; |
| 53 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\""; | 51 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\""; |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 EncryptedMediaTest, | 552 EncryptedMediaTest, |
| 555 Combine(Values(kExternalClearKeyKeySystem), | 553 Combine(Values(kExternalClearKeyKeySystem), |
| 556 Values(SRC), | 554 Values(SRC), |
| 557 Values(PREFIXED))); | 555 Values(PREFIXED))); |
| 558 INSTANTIATE_TEST_CASE_P(SRC_ExternalClearKey, | 556 INSTANTIATE_TEST_CASE_P(SRC_ExternalClearKey, |
| 559 EncryptedMediaTest, | 557 EncryptedMediaTest, |
| 560 Combine(Values(kExternalClearKeyKeySystem), | 558 Combine(Values(kExternalClearKeyKeySystem), |
| 561 Values(SRC), | 559 Values(SRC), |
| 562 Values(UNPREFIXED))); | 560 Values(UNPREFIXED))); |
| 563 #if !defined(OS_WIN) | 561 #if !defined(OS_WIN) |
| 562 const char kExternalClearKeyDecryptOnlyKeySystem[] = |
| 563 "org.chromium.externalclearkey.decryptonly"; |
| 564 |
| 564 // Tests flaky on Win 7 dbg. http://crbug.com/517018 | 565 // Tests flaky on Win 7 dbg. http://crbug.com/517018 |
| 565 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKey_Prefixed, | 566 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKey_Prefixed, |
| 566 EncryptedMediaTest, | 567 EncryptedMediaTest, |
| 567 Combine(Values(kExternalClearKeyKeySystem), | 568 Combine(Values(kExternalClearKeyKeySystem), |
| 568 Values(MSE), | 569 Values(MSE), |
| 569 Values(PREFIXED))); | 570 Values(PREFIXED))); |
| 570 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKey, | 571 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKey, |
| 571 EncryptedMediaTest, | 572 EncryptedMediaTest, |
| 572 Combine(Values(kExternalClearKeyKeySystem), | 573 Combine(Values(kExternalClearKeyKeySystem), |
| 573 Values(MSE), | 574 Values(MSE), |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 } | 842 } |
| 842 | 843 |
| 843 IN_PROC_BROWSER_TEST_F(ECKPrefixedEncryptedMediaTest, LoadLoadableSession) { | 844 IN_PROC_BROWSER_TEST_F(ECKPrefixedEncryptedMediaTest, LoadLoadableSession) { |
| 844 TestPlaybackCase(kLoadableSession, kEnded); | 845 TestPlaybackCase(kLoadableSession, kEnded); |
| 845 } | 846 } |
| 846 | 847 |
| 847 IN_PROC_BROWSER_TEST_F(ECKPrefixedEncryptedMediaTest, LoadUnknownSession) { | 848 IN_PROC_BROWSER_TEST_F(ECKPrefixedEncryptedMediaTest, LoadUnknownSession) { |
| 848 TestPlaybackCase(kUnknownSession, kPrefixedEmeErrorEvent); | 849 TestPlaybackCase(kUnknownSession, kPrefixedEmeErrorEvent); |
| 849 } | 850 } |
| 850 #endif // defined(ENABLE_PEPPER_CDMS) | 851 #endif // defined(ENABLE_PEPPER_CDMS) |
| OLD | NEW |