| 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 5575bffd24bb0cb872d8e4d35e8e2c36d9a37ef8..af786a4f47d9ca8dc21e654d0fd2015549da9716 100644
|
| --- a/chrome/browser/media/encrypted_media_browsertest.cc
|
| +++ b/chrome/browser/media/encrypted_media_browsertest.cc
|
| @@ -19,12 +19,14 @@
|
| #include "chrome/test/base/test_launcher_utils.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "content/public/test/browser_test_utils.h"
|
| +#include "ppapi/features/features.h"
|
| #include "testing/gtest/include/gtest/gtest-spi.h"
|
| +
|
| #if defined(OS_ANDROID)
|
| #include "base/android/build_info.h"
|
| #endif
|
|
|
| -#if defined(ENABLE_PEPPER_CDMS)
|
| +#if BUILDFLAG(ENABLE_PEPPER_CDMS)
|
| #include "chrome/browser/media/pepper_cdm_test_constants.h"
|
| #include "chrome/browser/media/pepper_cdm_test_helper.h"
|
| #include "media/base/media_switches.h"
|
| @@ -239,14 +241,14 @@ class EncryptedMediaTestBase : public MediaBrowserTest {
|
| switches::kDisableGestureRequirementForMediaPlayback);
|
| }
|
|
|
| -#if defined(ENABLE_PEPPER_CDMS)
|
| +#if BUILDFLAG(ENABLE_PEPPER_CDMS)
|
| void SetUpDefaultCommandLine(base::CommandLine* command_line) override {
|
| base::CommandLine default_command_line(base::CommandLine::NO_PROGRAM);
|
| InProcessBrowserTest::SetUpDefaultCommandLine(&default_command_line);
|
| test_launcher_utils::RemoveCommandLineSwitch(
|
| default_command_line, switches::kDisableComponentUpdate, command_line);
|
| }
|
| -#endif // defined(ENABLE_PEPPER_CDMS)
|
| +#endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
|
|
|
| void SetUpCommandLineForKeySystem(const std::string& key_system,
|
| base::CommandLine* command_line) {
|
| @@ -256,7 +258,7 @@ class EncryptedMediaTestBase : public MediaBrowserTest {
|
| // TODO(shadi): Add port forwarding to the test web server configuration.
|
| command_line->AppendSwitch(switches::kDisableWebSecurity);
|
|
|
| -#if defined(ENABLE_PEPPER_CDMS)
|
| +#if BUILDFLAG(ENABLE_PEPPER_CDMS)
|
| if (IsExternalClearKey(key_system)) {
|
| RegisterPepperCdm(command_line, kClearKeyCdmBaseDirectory,
|
| kClearKeyCdmAdapterFileName, kClearKeyCdmDisplayName,
|
| @@ -264,11 +266,11 @@ class EncryptedMediaTestBase : public MediaBrowserTest {
|
| command_line->AppendSwitchASCII(switches::kEnableFeatures,
|
| media::kExternalClearKeyForTesting.name);
|
| }
|
| -#endif // defined(ENABLE_PEPPER_CDMS)
|
| +#endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
|
| }
|
| };
|
|
|
| -#if defined(ENABLE_PEPPER_CDMS)
|
| +#if BUILDFLAG(ENABLE_PEPPER_CDMS)
|
| // Tests encrypted media playback using ExternalClearKey key system in
|
| // decrypt-and-decode mode.
|
| class ECKEncryptedMediaTest : public EncryptedMediaTestBase {
|
| @@ -311,7 +313,7 @@ class WVEncryptedMediaTest : public EncryptedMediaTestBase {
|
| };
|
|
|
| #endif // defined(WIDEVINE_CDM_AVAILABLE)
|
| -#endif // defined(ENABLE_PEPPER_CDMS)
|
| +#endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
|
|
|
| // Tests encrypted media playback with a combination of parameters:
|
| // - char*: Key system name.
|
| @@ -419,7 +421,7 @@ INSTANTIATE_TEST_CASE_P(MSE_ClearKey,
|
| Combine(Values(kClearKeyKeySystem), Values(MSE)));
|
|
|
| // External Clear Key is currently only used on platforms that use Pepper CDMs.
|
| -#if defined(ENABLE_PEPPER_CDMS)
|
| +#if BUILDFLAG(ENABLE_PEPPER_CDMS)
|
| INSTANTIATE_TEST_CASE_P(SRC_ExternalClearKey,
|
| EncryptedMediaTest,
|
| Combine(Values(kExternalClearKeyKeySystem),
|
| @@ -438,7 +440,7 @@ INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKeyDecryptOnly,
|
| EncryptedMediaTest,
|
| Combine(Values(kExternalClearKeyDecryptOnlyKeySystem),
|
| Values(MSE)));
|
| -#endif // defined(ENABLE_PEPPER_CDMS)
|
| +#endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
|
|
|
| #if defined(WIDEVINE_CDM_AVAILABLE)
|
| #if !defined(OS_CHROMEOS)
|
| @@ -605,7 +607,7 @@ IN_PROC_BROWSER_TEST_F(WVEncryptedMediaTest, ParentThrowsException) {
|
| }
|
| #endif // defined(WIDEVINE_CDM_AVAILABLE)
|
|
|
| -#if defined(ENABLE_PEPPER_CDMS)
|
| +#if BUILDFLAG(ENABLE_PEPPER_CDMS)
|
| IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, InitializeCDMFail) {
|
| TestNonPlaybackCases(kExternalClearKeyInitializeFailKeySystem,
|
| kEmeNotSupportedError);
|
| @@ -651,4 +653,4 @@ IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadUnknownSession) {
|
| kEmeSessionNotFound);
|
| }
|
|
|
| -#endif // defined(ENABLE_PEPPER_CDMS)
|
| +#endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
|
|
|