Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(728)

Unified Diff: chrome/browser/content_settings/content_settings_browsertest.cc

Issue 15028015: Conditionally build support for Pepper-based CDMs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Conditionally compile External Clear Key tests Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_settings/content_settings_browsertest.cc
diff --git a/chrome/browser/content_settings/content_settings_browsertest.cc b/chrome/browser/content_settings/content_settings_browsertest.cc
index 998e4c1c0fab037b283554e9635bc17daa16c7ba..d62293b912117f34e42c89057bb9fca8f0065f33 100644
--- a/chrome/browser/content_settings/content_settings_browsertest.cc
+++ b/chrome/browser/content_settings/content_settings_browsertest.cc
@@ -485,6 +485,7 @@ class PepperContentSettingsTest : public ContentSettingsTest {
#endif
#endif // defined(OS_WIN)
+#if defined(ENABLE_PEPPER_CDMS)
// Append the switch to register the External Clear Key CDM.
base::FilePath plugin_dir;
EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &plugin_dir));
@@ -496,6 +497,7 @@ class PepperContentSettingsTest : public ContentSettingsTest {
pepper_plugin.append(external_clear_key_mime_type);
command_line->AppendSwitchNative(switches::kRegisterPepperPlugins,
pepper_plugin);
+#endif // defined(ENABLE_PEPPER_CDMS)
#if !defined(DISABLE_NACL)
// Ensure NaCl can run.
command_line->AppendSwitch(switches::kEnableNaCl);
@@ -560,18 +562,22 @@ IN_PROC_BROWSER_TEST_F(PepperContentSettingsTest, PluginSpecialCases) {
content_settings->SetDefaultContentSetting(
CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_ALLOW);
+#if defined(ENABLE_PEPPER_CDMS)
RunLoadPepperPluginTest(kExternalClearKeyMimeType, true);
+#endif
// Next, test behavior when plug-ins are blocked.
content_settings->SetDefaultContentSetting(
CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_BLOCK);
+#if defined(ENABLE_PEPPER_CDMS)
// The plugin we loaded above does not load now.
RunLoadPepperPluginTest(kExternalClearKeyMimeType, false);
#if defined(WIDEVINE_CDM_AVAILABLE)
RunLoadPepperPluginTest(kWidevineCdmPluginMimeType, true);
#endif
+#endif // defined(ENABLE_PEPPER_CDMS)
#if !defined(DISABLE_NACL)
RunLoadPepperPluginTest("application/x-nacl", true);
@@ -583,12 +589,14 @@ IN_PROC_BROWSER_TEST_F(PepperContentSettingsTest, PluginSpecialCases) {
content_settings->SetDefaultContentSetting(
CONTENT_SETTINGS_TYPE_JAVASCRIPT, CONTENT_SETTING_BLOCK);
+#if defined(ENABLE_PEPPER_CDMS)
// This plugin has no special behavior and does not require JavaScript.
RunJavaScriptBlockedTest("load_clearkey_no_js.html", false);
#if defined(WIDEVINE_CDM_AVAILABLE)
RunJavaScriptBlockedTest("load_widevine_no_js.html", true);
#endif
+#endif // defined(ENABLE_PEPPER_CDMS)
#if !defined(DISABLE_NACL)
RunJavaScriptBlockedTest("load_nacl_no_js.html", true);

Powered by Google App Engine
This is Rietveld 408576698