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

Unified Diff: chrome/browser/media/encrypted_media_supported_types_browsertest.cc

Issue 1996863002: media: Use bundled Widevine CDM in encrypted media browser tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/media/encrypted_media_supported_types_browsertest.cc
diff --git a/chrome/browser/media/encrypted_media_supported_types_browsertest.cc b/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
index 65c6f9cf74b818f21c55840f80abc8f12501bd95..95160e75ae12eb2cd3101a192fbf0f3caf491672 100644
--- a/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
+++ b/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
@@ -85,26 +85,23 @@ const char kUnexpectedResult[] = "unexpected result";
#endif // defined(ENABLE_PEPPER_CDMS)
// Expectations for Widevine.
-// Note: Widevine is not available on platforms using components because
-// RegisterPepperCdm() cannot set the codecs.
-// TODO(xhwang): Enable these tests after we have the ability to use the
-// manifest in these tests. See http://crbug.com/586634
-#if defined(WIDEVINE_CDM_AVAILABLE) && !defined(WIDEVINE_CDM_IS_COMPONENT)
+#if defined(WIDEVINE_CDM_AVAILABLE)
#define EXPECT_WV_SUCCESS EXPECT_SUCCESS
#define EXPECT_WV_PROPRIETARY EXPECT_PROPRIETARY
#define EXPECT_WV_NO_MATCH EXPECT_NO_MATCH
-#else // defined(WIDEVINE_CDM_AVAILABLE) && !defined(WIDEVINE_CDM_IS_COMPONENT)
+#else // defined(WIDEVINE_CDM_AVAILABLE)
#define EXPECT_WV_SUCCESS EXPECT_UNKNOWN_KEYSYSTEM
#define EXPECT_WV_PROPRIETARY EXPECT_UNKNOWN_KEYSYSTEM
#define EXPECT_WV_NO_MATCH EXPECT_UNKNOWN_KEYSYSTEM
-#endif // defined(WIDEVINE_CDM_AVAILABLE) &&
- // !defined(WIDEVINE_CDM_IS_COMPONENT)
+#endif // defined(WIDEVINE_CDM_AVAILABLE)
}; // namespace
class EncryptedMediaSupportedTypesTest : public InProcessBrowserTest {
protected:
EncryptedMediaSupportedTypesTest() {
+ enable_component_update();
+
audio_webm_codecs_.push_back("opus");
audio_webm_codecs_.push_back("vorbis");
@@ -265,9 +262,6 @@ class EncryptedMediaSupportedTypesExternalClearKeyTest
#endif // defined(ENABLE_PEPPER_CDMS)
};
-// TODO(sandersd): Register the Widevine CDM if it is a component. A component
-// CDM registered using RegisterPepperCdm() declares support for audio codecs,
-// but not the other codecs we expect. http://crbug.com/356833.
class EncryptedMediaSupportedTypesWidevineTest
: public EncryptedMediaSupportedTypesTest {
};
@@ -652,9 +646,8 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesTest,
EXPECT_UNKNOWN_KEYSYSTEM(AreCodecsSupportedByKeySystem(
kVideoWebMMimeType, no_codecs(), kExternalClearKey));
- // This will fail in all builds unless widevine is available but not a
- // component, in which case it is registered internally
-#if !defined(WIDEVINE_CDM_AVAILABLE) || defined(WIDEVINE_CDM_IS_COMPONENT)
+// This will fail in all builds unless widevine is available.
+#if !defined(WIDEVINE_CDM_AVAILABLE)
ddorwin 2016/05/20 16:56:15 ditto with below.
xhwang 2016/05/20 21:23:28 see below.
EXPECT_UNKNOWN_KEYSYSTEM(AreCodecsSupportedByKeySystem(
kVideoWebMMimeType, no_codecs(), kWidevine));
#endif
@@ -678,9 +671,8 @@ IN_PROC_BROWSER_TEST_F(
kVideoWebMMimeType, no_codecs(), kClearKey));
}
-// This will fail in all builds unless Widevine is available but not a
-// component, in which case it is registered internally.
-#if !defined(WIDEVINE_CDM_AVAILABLE) || defined(WIDEVINE_CDM_IS_COMPONENT)
+// This will fail in all builds unless Widevine is available.
+#if !defined(WIDEVINE_CDM_AVAILABLE)
ddorwin 2016/05/20 16:56:15 This test could be run if defined(WIDEVINE_CDM_IS_
xhwang 2016/05/20 21:23:28 I don't think it's super interesting to test the c
ddorwin 2016/05/20 21:27:55 I was thinking it's interesting for the case where
IN_PROC_BROWSER_TEST_F(
EncryptedMediaSupportedTypesWidevineCDMRegisteredWithWrongPathTest,
PepperCDMsRegisteredButAdapterNotPresent) {
@@ -691,8 +683,6 @@ IN_PROC_BROWSER_TEST_F(
EXPECT_SUCCESS(AreCodecsSupportedByKeySystem(
kVideoWebMMimeType, no_codecs(), kClearKey));
}
-#endif // !defined(WIDEVINE_CDM_AVAILABLE) ||
- // defined(WIDEVINE_CDM_IS_COMPONENT)
+#endif // !defined(WIDEVINE_CDM_AVAILABLE)
#endif // defined(ENABLE_PEPPER_CDMS)
-
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698