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

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

Issue 755143004: Advertise Opus support in EME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable tests on Android. Created 6 years, 1 month 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
« no previous file with comments | « chrome/browser/media/encrypted_media_browsertest.cc ('k') | chrome/renderer/media/chrome_key_systems.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d725ad161fc8e694a28e9fd3736314dd380192b7..7d13c0469e3ba2c013fc7bcce86479367e156baf 100644
--- a/chrome/browser/media/encrypted_media_istypesupported_browsertest.cc
+++ b/chrome/browser/media/encrypted_media_istypesupported_browsertest.cc
@@ -106,8 +106,16 @@ class EncryptedMediaIsTypeSupportedTest : public InProcessBrowserTest {
vp90_codec_.push_back("vp9.0");
+ opus_codec_.push_back("opus");
+
vorbis_codec_.push_back("vorbis");
+ vp8_and_opus_codecs_.push_back("vp8");
+ vp8_and_opus_codecs_.push_back("opus");
+
+ vp9_and_opus_codecs_.push_back("vp9");
+ vp9_and_opus_codecs_.push_back("opus");
+
vp8_and_vorbis_codecs_.push_back("vp8");
vp8_and_vorbis_codecs_.push_back("vorbis");
@@ -157,7 +165,14 @@ class EncryptedMediaIsTypeSupportedTest : public InProcessBrowserTest {
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& opus_codec() const { return opus_codec_; }
const CodecVector& vorbis_codec() const { return vorbis_codec_; }
+ const CodecVector& vp8_and_opus_codecs() const {
+ return vp8_and_opus_codecs_;
+ }
+ const CodecVector& vp9_and_opus_codecs() const {
+ return vp9_and_opus_codecs_;
+ }
const CodecVector& vp8_and_vorbis_codecs() const {
return vp8_and_vorbis_codecs_;
}
@@ -298,7 +313,10 @@ class EncryptedMediaIsTypeSupportedTest : public InProcessBrowserTest {
CodecVector vp80_codec_;
CodecVector vp9_codec_;
CodecVector vp90_codec_;
+ CodecVector opus_codec_;
CodecVector vorbis_codec_;
+ CodecVector vp8_and_opus_codecs_;
+ CodecVector vp9_and_opus_codecs_;
CodecVector vp8_and_vorbis_codecs_;
CodecVector vp9_and_vorbis_codecs_;
CodecVector avc1_codec_;
@@ -481,12 +499,18 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaIsTypeSupportedTest,
EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp80_codec(), kPrefixedClearKey));
EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp8_and_opus_codecs(), kPrefixedClearKey));
+ 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_opus_codecs(), kPrefixedClearKey));
+ EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", opus_codec(), kPrefixedClearKey));
+ EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp9_and_vorbis_codecs(), kPrefixedClearKey));
EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vorbis_codec(), kPrefixedClearKey));
@@ -507,16 +531,22 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaIsTypeSupportedTest,
EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", no_codecs(), kPrefixedClearKey));
EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
+ "audio/webm", opus_codec(), kPrefixedClearKey));
+ EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vorbis_codec(), kPrefixedClearKey));
// Non-audio codecs.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vp8_codec(), kPrefixedClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ "audio/webm", vp8_and_opus_codecs(), 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_opus_codecs(), kPrefixedClearKey));
+ EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vp9_and_vorbis_codecs(), kPrefixedClearKey));
// Non-Webm codec.
@@ -597,6 +627,8 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaIsTypeSupportedTest,
// Invalid or Non-MP4 codec.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ "audio/mp4", opus_codec(), kPrefixedClearKey));
+ EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/mp4", vorbis_codec(), kPrefixedClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/mp4", mp4a_invalid_no_extension(), kPrefixedClearKey));
@@ -692,12 +724,18 @@ IN_PROC_BROWSER_TEST_F(
EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp80_codec(), kExternalClearKey));
EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp8_and_opus_codecs(), kExternalClearKey));
+ EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp8_and_vorbis_codecs(), kExternalClearKey));
EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp9_codec(), kExternalClearKey));
EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp90_codec(), kExternalClearKey));
EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp9_and_opus_codecs(), kExternalClearKey));
+ EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", opus_codec(), kExternalClearKey));
+ EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp9_and_vorbis_codecs(), kExternalClearKey));
EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vorbis_codec(), kExternalClearKey));
@@ -718,16 +756,22 @@ IN_PROC_BROWSER_TEST_F(
EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", no_codecs(), kExternalClearKey));
EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
+ "audio/webm", opus_codec(), kExternalClearKey));
+ EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vorbis_codec(), kExternalClearKey));
// Non-audio codecs.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vp8_codec(), kExternalClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ "audio/webm", vp8_and_opus_codecs(), 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_opus_codecs(), kExternalClearKey));
+ EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vp9_and_vorbis_codecs(), kExternalClearKey));
// Non-Webm codec.
@@ -809,6 +853,8 @@ IN_PROC_BROWSER_TEST_F(
// Invalid or Non-MP4 codec.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ "audio/mp4", opus_codec(), kExternalClearKey));
+ EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/mp4", vorbis_codec(), kExternalClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/mp4", mp4a_invalid_no_extension(), kExternalClearKey));
@@ -899,12 +945,18 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaIsTypeSupportedWidevineTest,
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp80_codec(), kWidevineAlpha));
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp8_and_opus_codecs(), kWidevineAlpha));
+ EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp8_and_vorbis_codecs(), kWidevineAlpha));
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp9_codec(), kWidevineAlpha));
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp90_codec(), kWidevineAlpha));
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp9_and_opus_codecs(), kWidevineAlpha));
+ EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", opus_codec(), kWidevineAlpha));
+ EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp9_and_vorbis_codecs(), kWidevineAlpha));
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vorbis_codec(), kWidevineAlpha));
@@ -917,12 +969,18 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaIsTypeSupportedWidevineTest,
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp80_codec(), kWidevine));
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp8_and_opus_codecs(), kWidevine));
+ EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp8_and_vorbis_codecs(), kWidevine));
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp9_codec(), kWidevine));
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp90_codec(), kWidevine));
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", vp9_and_opus_codecs(), kWidevine));
+ EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
+ "video/webm", opus_codec(), kWidevine));
+ EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vp9_and_vorbis_codecs(), kWidevine));
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"video/webm", vorbis_codec(), kWidevine));
@@ -943,22 +1001,30 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaIsTypeSupportedWidevineTest,
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", no_codecs(), kWidevineAlpha));
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
+ "audio/webm", opus_codec(), kWidevineAlpha));
+ EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vorbis_codec(), kWidevineAlpha));
// Valid audio types - parent key system.
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", no_codecs(), kWidevine));
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
+ "audio/webm", opus_codec(), kWidevine));
+ EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vorbis_codec(), kWidevine));
// Non-audio codecs.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vp8_codec(), kWidevineAlpha));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ "audio/webm", vp8_and_opus_codecs(), kWidevineAlpha));
+ EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vp8_and_vorbis_codecs(), kWidevineAlpha));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vp9_codec(), kWidevineAlpha));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ "audio/webm", vp9_and_opus_codecs(), kWidevineAlpha));
+ EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/webm", vp9_and_vorbis_codecs(), kWidevineAlpha));
// Non-Webm codec.
@@ -1056,6 +1122,8 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaIsTypeSupportedWidevineTest,
// Invalid or Non-MP4 codec.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ "audio/mp4", opus_codec(), kWidevineAlpha));
+ EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/mp4", vorbis_codec(), kWidevineAlpha));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/mp4", mp4a_invalid_no_extension(), kWidevineAlpha));
« no previous file with comments | « chrome/browser/media/encrypted_media_browsertest.cc ('k') | chrome/renderer/media/chrome_key_systems.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698