| Index: chrome/browser/media/encrypted_media_browsertest.cc
|
| diff --git a/chrome/browser/media/encrypted_media_browsertest.cc b/chrome/browser/media/encrypted_media_browsertest.cc
|
| index e119636da1d705bd4483e79bb96f6f517e22586a..f43c9139c15a384eddcd600dbe300131f160b028 100644
|
| --- a/chrome/browser/media/encrypted_media_browsertest.cc
|
| +++ b/chrome/browser/media/encrypted_media_browsertest.cc
|
| @@ -112,11 +112,11 @@ class EncryptedMediaTestBase : public MediaBrowserTest {
|
| IsParentKeySystemOf(kExternalClearKeyKeySystem, key_system);
|
| }
|
|
|
| -#if defined(WIDEVINE_CDM_AVAILABLE)
|
| +#if defined(ENABLE_WIDEVINE_CDM)
|
| bool IsWidevine(const std::string& key_system) {
|
| return key_system == kWidevineKeySystem;
|
| }
|
| -#endif // defined(WIDEVINE_CDM_AVAILABLE)
|
| +#endif // defined(ENABLE_WIDEVINE_CDM)
|
|
|
| void RunEncryptedMediaTestPage(
|
| const std::string& html_page,
|
| @@ -207,23 +207,23 @@ class EncryptedMediaTestBase : public MediaBrowserTest {
|
| }
|
|
|
| bool IsPlayBackPossible(const std::string& key_system) {
|
| -#if defined(WIDEVINE_CDM_AVAILABLE)
|
| +#if defined(ENABLE_WIDEVINE_CDM)
|
| if (IsWidevine(key_system) && !GetServerConfig(key_system))
|
| return false;
|
| -#endif // defined(WIDEVINE_CDM_AVAILABLE)
|
| +#endif // defined(ENABLE_WIDEVINE_CDM)
|
| return true;
|
| }
|
|
|
| scoped_ptr<TestLicenseServerConfig> GetServerConfig(
|
| const std::string& key_system) {
|
| -#if defined(WIDEVINE_CDM_AVAILABLE)
|
| +#if defined(ENABLE_WIDEVINE_CDM)
|
| if (IsWidevine(key_system)) {
|
| scoped_ptr<TestLicenseServerConfig> config =
|
| scoped_ptr<TestLicenseServerConfig>(new WVTestLicenseServerConfig());
|
| if (config->IsPlatformSupported())
|
| return config.Pass();
|
| }
|
| -#endif // defined(WIDEVINE_CDM_AVAILABLE)
|
| +#endif // defined(ENABLE_WIDEVINE_CDM)
|
| return scoped_ptr<TestLicenseServerConfig>();
|
| }
|
|
|
| @@ -256,11 +256,11 @@ class EncryptedMediaTestBase : public MediaBrowserTest {
|
| if (IsExternalClearKey(key_system)) {
|
| RegisterPepperCdm(command_line, kClearKeyCdmAdapterFileName, key_system);
|
| }
|
| -#if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)
|
| +#if defined(ENABLE_WIDEVINE_CDM) && defined(WIDEVINE_CDM_IS_COMPONENT)
|
| else if (IsWidevine(key_system)) { // NOLINT
|
| RegisterPepperCdm(command_line, kWidevineCdmAdapterFileName, key_system);
|
| }
|
| -#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)
|
| +#endif // defined(ENABLE_WIDEVINE_CDM) && defined(WIDEVINE_CDM_IS_COMPONENT)
|
| #endif // defined(ENABLE_PEPPER_CDMS)
|
| }
|
|
|
| @@ -293,10 +293,10 @@ class EncryptedMediaTestBase : public MediaBrowserTest {
|
| std::string GetPepperType(const std::string& key_system) {
|
| if (IsExternalClearKey(key_system))
|
| return kClearKeyCdmPluginMimeType;
|
| -#if defined(WIDEVINE_CDM_AVAILABLE)
|
| +#if defined(ENABLE_WIDEVINE_CDM)
|
| if (IsWidevine(key_system))
|
| return kWidevineCdmPluginMimeType;
|
| -#endif // WIDEVINE_CDM_AVAILABLE
|
| +#endif // ENABLE_WIDEVINE_CDM
|
|
|
| NOTREACHED();
|
| return "";
|
| @@ -348,7 +348,7 @@ class ECKUnprefixedEncryptedMediaTest : public EncryptedMediaTestBase {
|
| }
|
| };
|
|
|
| -#if defined(WIDEVINE_CDM_AVAILABLE)
|
| +#if defined(ENABLE_WIDEVINE_CDM)
|
| // Tests encrypted media playback using Widevine key system.
|
| class WVEncryptedMediaTest : public EncryptedMediaTestBase {
|
| protected:
|
| @@ -359,7 +359,7 @@ class WVEncryptedMediaTest : public EncryptedMediaTestBase {
|
| }
|
| };
|
|
|
| -#endif // defined(WIDEVINE_CDM_AVAILABLE)
|
| +#endif // defined(ENABLE_WIDEVINE_CDM)
|
| #endif // defined(ENABLE_PEPPER_CDMS)
|
|
|
| // Tests encrypted media playback with a combination of parameters:
|
| @@ -509,7 +509,7 @@ INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKeyDecryptOnly,
|
| Values(UNPREFIXED)));
|
| #endif // defined(ENABLE_PEPPER_CDMS)
|
|
|
| -#if defined(WIDEVINE_CDM_AVAILABLE)
|
| +#if defined(ENABLE_WIDEVINE_CDM)
|
| // This test doesn't fully test playback with Widevine. So we only run Widevine
|
| // test with MSE (no SRC) to reduce test time. Also, on Android EME only works
|
| // with MSE and we cannot run this test with SRC.
|
| @@ -527,7 +527,7 @@ INSTANTIATE_TEST_CASE_P(MSE_Widevine,
|
| Values(MSE),
|
| Values(UNPREFIXED)));
|
| #endif // !defined(WIDEVINE_CDM_IS_COMPONENT)
|
| -#endif // defined(WIDEVINE_CDM_AVAILABLE)
|
| +#endif // defined(ENABLE_WIDEVINE_CDM)
|
|
|
| // These tests time out in Chrome OS official builds. http://crbug.com/430711
|
| #if !(defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD))
|
| @@ -617,7 +617,7 @@ IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioOnly_MP4) {
|
| #endif // defined(USE_PROPRIETARY_CODECS)
|
| #endif // !(defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD))
|
|
|
| -#if defined(WIDEVINE_CDM_AVAILABLE)
|
| +#if defined(ENABLE_WIDEVINE_CDM)
|
| // The parent key system cannot be used in generateKeyRequest.
|
| IN_PROC_BROWSER_TEST_F(WVEncryptedMediaTest, ParentThrowsException_Prefixed) {
|
| RunEncryptedMediaTest(kDefaultEmePlayer,
|
| @@ -644,7 +644,7 @@ IN_PROC_BROWSER_TEST_F(WVEncryptedMediaTest, ParentThrowsException) {
|
| false,
|
| kEmeNotSupportedError);
|
| }
|
| -#endif // defined(WIDEVINE_CDM_AVAILABLE)
|
| +#endif // defined(ENABLE_WIDEVINE_CDM)
|
|
|
| #if defined(ENABLE_PEPPER_CDMS)
|
| IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, InitializeCDMFail) {
|
|
|