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

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

Issue 252513005: Encrypted Media: Add VP9 support to IsTypeSupported(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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_istypesupported_browsertest.cc
diff --git a/chrome/browser/media/encrypted_media_istypesupported_browsertest.cc b/chrome/browser/media/encrypted_media_istypesupported_browsertest.cc
index ed0e4daa000ee341649c93e4df2b08d0849e6136..5261c03e6f1add7a2b1fa906c1d20b64784cdd46 100644
--- a/chrome/browser/media/encrypted_media_istypesupported_browsertest.cc
+++ b/chrome/browser/media/encrypted_media_istypesupported_browsertest.cc
@@ -21,6 +21,10 @@
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
+#if defined(OS_ANDROID)
+#error This file needs to be updated to run on Android.
ddorwin 2014/04/24 23:00:23 Is it not even compiled currently?
xhwang 2014/04/25 16:49:08 I think no browser tests are running on android ri
ddorwin 2014/04/28 18:30:51 My point was this might fail the build if the test
+#endif
+
#if defined(USE_PROPRIETARY_CODECS)
#define EXPECT_PROPRIETARY EXPECT_TRUE
#else
@@ -94,11 +98,18 @@ class EncryptedMediaIsTypeSupportedTest : public InProcessBrowserTest {
vp80_codec_.push_back("vp8.0");
+ vp9_codec_.push_back("vp9");
ddorwin 2014/04/24 23:00:23 We should really simplify this test sometime. :)
xhwang 2014/04/25 16:49:08 Can't agree more! Filed bug and added TODO.
+
+ vp90_codec_.push_back("vp9.0");
+
vorbis_codec_.push_back("vorbis");
vp8_and_vorbis_codecs_.push_back("vp8");
vp8_and_vorbis_codecs_.push_back("vorbis");
+ vp9_and_vorbis_codecs_.push_back("vp9");
+ vp9_and_vorbis_codecs_.push_back("vorbis");
+
avc1_codec_.push_back("avc1");
avc1_extended_codec_.push_back("avc1.4D400C");
@@ -127,10 +138,15 @@ class EncryptedMediaIsTypeSupportedTest : public InProcessBrowserTest {
const CodecVector& no_codecs() const { return no_codecs_; }
const CodecVector& vp8_codec() const { return vp8_codec_; }
const CodecVector& vp80_codec() const { return vp80_codec_; }
+ const CodecVector& vp9_codec() const { return vp9_codec_; }
+ const CodecVector& vp90_codec() const { return vp90_codec_; }
const CodecVector& vorbis_codec() const { return vorbis_codec_; }
const CodecVector& vp8_and_vorbis_codecs() const {
return vp8_and_vorbis_codecs_;
}
+ const CodecVector& vp9_and_vorbis_codecs() const {
+ return vp9_and_vorbis_codecs_;
+ }
const CodecVector& avc1_codec() const { return avc1_codec_; }
const CodecVector& avc1_extended_codec() const {
return avc1_extended_codec_;
@@ -244,8 +260,11 @@ class EncryptedMediaIsTypeSupportedTest : public InProcessBrowserTest {
const CodecVector no_codecs_;
CodecVector vp8_codec_;
CodecVector vp80_codec_;
+ CodecVector vp9_codec_;
+ CodecVector vp90_codec_;
CodecVector vorbis_codec_;
CodecVector vp8_and_vorbis_codecs_;
+ CodecVector vp9_and_vorbis_codecs_;
CodecVector avc1_codec_;
CodecVector avc1_extended_codec_;
CodecVector avc1_dot_codec_;
@@ -423,6 +442,12 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaIsTypeSupportedTest,
EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp8_and_vorbis_codecs(), kPrefixedClearKey));
EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp9_codec(), kPrefixedClearKey));
+ EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp90_codec(), kPrefixedClearKey));
+ EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp9_and_vorbis_codecs(), kPrefixedClearKey));
+ EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vorbis_codec(), kPrefixedClearKey));
// Non-Webm codecs.
@@ -444,6 +469,10 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaIsTypeSupportedTest,
"audio/webm", vp8_codec(), kPrefixedClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vp8_and_vorbis_codecs(), kPrefixedClearKey));
+ EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ "audio/webm", vp9_codec(), kPrefixedClearKey));
+ EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ "audio/webm", vp9_and_vorbis_codecs(), kPrefixedClearKey));
// Non-Webm codec.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
@@ -598,6 +627,12 @@ IN_PROC_BROWSER_TEST_F(
EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp8_and_vorbis_codecs(), kExternalClearKey));
EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp9_codec(), kExternalClearKey));
ddorwin 2014/04/24 23:00:23 Does ECK actually support VP9 yet?
xhwang 2014/04/25 16:49:08 Yes, there's a browser test added to cover this!
+ EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp90_codec(), kExternalClearKey));
+ EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp9_and_vorbis_codecs(), kExternalClearKey));
+ EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vorbis_codec(), kExternalClearKey));
// Non-Webm codecs.
@@ -619,6 +654,10 @@ IN_PROC_BROWSER_TEST_F(
"audio/webm", vp8_codec(), kExternalClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vp8_and_vorbis_codecs(), kExternalClearKey));
+ EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ "audio/webm", vp9_codec(), kExternalClearKey));
+ EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ "audio/webm", vp9_and_vorbis_codecs(), kExternalClearKey));
// Non-Webm codec.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
@@ -757,6 +796,9 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaIsTypeSupportedWidevineTest,
std::string(), no_codecs(), "com.widevine.alpha.foo"));
}
+// TODO(xhwang): Add VP9 Widevine tests after VP9 is supported by Widevine CDM.
+// See http://crbug.com/361318
+
IN_PROC_BROWSER_TEST_F(EncryptedMediaIsTypeSupportedWidevineTest,
IsSupportedKeySystemWithMediaMimeType_Widevine_WebM) {
// Valid video types.

Powered by Google App Engine
This is Rietveld 408576698