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

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

Issue 389383002: Revert 277386 "Fix: Adding list of supported codecs for MP4 cont..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | content/browser/media/media_canplaytype_browsertest.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
===================================================================
--- chrome/browser/media/encrypted_media_istypesupported_browsertest.cc (revision 282961)
+++ chrome/browser/media/encrypted_media_istypesupported_browsertest.cc (working copy)
@@ -122,24 +122,17 @@
avc3_codec_.push_back("avc3");
- avc3_extended_codec_.push_back("avc3.64001F");
+ avc3_extended_codec_.push_back("avc3.64001f");
- aac_codec_.push_back("mp4a.40.2");
+ aac_codec_.push_back("mp4a");
- mp4a_invalid_no_extension_.push_back("mp4a");
-
avc1_and_aac_codecs_.push_back("avc1");
- avc1_and_aac_codecs_.push_back("mp4a.40.2");
+ avc1_and_aac_codecs_.push_back("mp4a");
- avc3_and_aac_codecs_.push_back("avc3");
- avc3_and_aac_codecs_.push_back("mp4a.40.2");
-
unknown_codec_.push_back("foo");
mixed_codecs_.push_back("vorbis");
mixed_codecs_.push_back("avc1");
-
- vp8_invalid_extension_codec_.push_back("vp8.1");
}
typedef std::vector<std::string> CodecVector;
@@ -167,20 +160,11 @@
return avc3_extended_codec_;
}
const CodecVector& aac_codec() const { return aac_codec_; }
- const CodecVector& mp4a_invalid_no_extension() const {
- return mp4a_invalid_no_extension_;
- }
const CodecVector& avc1_and_aac_codecs() const {
return avc1_and_aac_codecs_;
}
- const CodecVector& avc3_and_aac_codecs() const {
- return avc3_and_aac_codecs_;
- }
const CodecVector& unknown_codec() const { return unknown_codec_; }
const CodecVector& mixed_codecs() const { return mixed_codecs_; }
- const CodecVector& vp8_invalid_extension_codec() const {
- return vp8_invalid_extension_codec_;
- }
// Update the command line to load |adapter_name| for
// |pepper_type_for_key_system|.
@@ -290,12 +274,9 @@
CodecVector avc3_codec_;
CodecVector avc3_extended_codec_;
CodecVector aac_codec_;
- CodecVector mp4a_invalid_no_extension_;
CodecVector avc1_and_aac_codecs_;
- CodecVector avc3_and_aac_codecs_;
CodecVector unknown_codec_;
CodecVector mixed_codecs_;
- CodecVector vp8_invalid_extension_codec_;
bool is_test_page_loaded_;
bool is_pepper_cdm_registered_;
};
@@ -475,13 +456,9 @@
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", avc1_codec(), kPrefixedClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "video/webm", avc3_codec(), kPrefixedClearKey));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", unknown_codec(), kPrefixedClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", mixed_codecs(), kPrefixedClearKey));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "video/webm", vp8_invalid_extension_codec(), kPrefixedClearKey));
// Valid audio types.
EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType(
@@ -519,8 +496,6 @@
EXPECT_PROPRIETARY(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc3_codec(), kPrefixedClearKey));
EXPECT_PROPRIETARY(IsSupportedKeySystemWithMediaMimeType(
- "video/mp4", avc3_and_aac_codecs(), kPrefixedClearKey));
- EXPECT_PROPRIETARY(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", aac_codec(), kPrefixedClearKey));
// Extended codecs.
@@ -529,23 +504,19 @@
EXPECT_PROPRIETARY(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc3_extended_codec(), kPrefixedClearKey));
- // Invalid codec format: profile parameter must be present after the period.
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ // Invalid codec format, but canPlayType() strips away the period.
+ EXPECT_PROPRIETARY(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc1_dot_codec(), kPrefixedClearKey));
- // Invalid or Non-MP4 codecs.
+ // Non-MP4 codecs.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc2_codec(), kPrefixedClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "video/mp4", mp4a_invalid_no_extension(), kPrefixedClearKey));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", vp8_codec(), kPrefixedClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", unknown_codec(), kPrefixedClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", mixed_codecs(), kPrefixedClearKey));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "video/mp4", vp8_invalid_extension_codec(), kPrefixedClearKey));
// Valid audio types.
EXPECT_PROPRIETARY(IsSupportedKeySystemWithMediaMimeType(
@@ -561,11 +532,9 @@
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/mp4", avc3_codec(), kPrefixedClearKey));
- // Invalid or Non-MP4 codec.
+ // Non-MP4 codec.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/mp4", vorbis_codec(), kPrefixedClearKey));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "audio/mp4", mp4a_invalid_no_extension(), kPrefixedClearKey));
}
//
@@ -672,13 +641,9 @@
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", avc1_codec(), kExternalClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "video/webm", avc3_codec(), kExternalClearKey));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", unknown_codec(), kExternalClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", mixed_codecs(), kExternalClearKey));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "video/webm", vp8_invalid_extension_codec(), kExternalClearKey));
// Valid audio types.
EXPECT_ECK(IsSupportedKeySystemWithMediaMimeType(
@@ -717,8 +682,6 @@
EXPECT_ECKPROPRIETARY(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc3_codec(), kExternalClearKey));
EXPECT_ECKPROPRIETARY(IsSupportedKeySystemWithMediaMimeType(
- "video/mp4", avc3_and_aac_codecs(), kExternalClearKey));
- EXPECT_ECKPROPRIETARY(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", aac_codec(), kExternalClearKey));
// Extended codecs.
@@ -727,23 +690,19 @@
EXPECT_ECKPROPRIETARY(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc3_extended_codec(), kExternalClearKey));
- // Invalid codec format: profile parameter must be present after the period.
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ // Invalid codec format, but canPlayType() strips away the period.
+ EXPECT_ECKPROPRIETARY(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc1_dot_codec(), kExternalClearKey));
- // Invalid or Non-MP4 codecs.
+ // Non-MP4 codecs.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc2_codec(), kExternalClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "video/mp4", mp4a_invalid_no_extension(), kExternalClearKey));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", vp8_codec(), kExternalClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", unknown_codec(), kExternalClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", mixed_codecs(), kExternalClearKey));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "video/mp4", vp8_invalid_extension_codec(), kExternalClearKey));
// Valid audio types.
EXPECT_ECKPROPRIETARY(IsSupportedKeySystemWithMediaMimeType(
@@ -758,14 +717,10 @@
"audio/mp4", avc1_and_aac_codecs(), kExternalClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/mp4", avc3_codec(), kExternalClearKey));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "audio/mp4", avc3_and_aac_codecs(), kExternalClearKey));
- // Invalid or Non-MP4 codec.
+ // Non-MP4 codec.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/mp4", vorbis_codec(), kExternalClearKey));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "audio/mp4", mp4a_invalid_no_extension(), kExternalClearKey));
}
//
@@ -876,13 +831,9 @@
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", avc1_codec(), kWidevineAlpha));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "video/webm", avc3_codec(), kWidevineAlpha));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", unknown_codec(), kWidevineAlpha));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/webm", mixed_codecs(), kWidevineAlpha));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "video/webm", vp8_invalid_extension_codec(), kWidevineAlpha));
// Valid audio types.
EXPECT_WV(IsSupportedKeySystemWithMediaMimeType(
@@ -919,8 +870,6 @@
EXPECT_WVAVC1(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc3_codec(), kWidevineAlpha));
EXPECT_WVAVC1AAC(IsSupportedKeySystemWithMediaMimeType(
- "video/mp4", avc3_and_aac_codecs(), kWidevineAlpha));
- EXPECT_WVAVC1AAC(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", aac_codec(), kWidevineAlpha));
// Valid video types - parent key system.
@@ -930,11 +879,7 @@
"video/mp4", avc1_codec(), kWidevine));
EXPECT_WVAVC1AAC(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc1_and_aac_codecs(), kWidevine));
- EXPECT_WVAVC1(IsSupportedKeySystemWithMediaMimeType(
- "video/mp4", avc3_codec(), kWidevine));
EXPECT_WVAVC1AAC(IsSupportedKeySystemWithMediaMimeType(
- "video/mp4", avc3_and_aac_codecs(), kWidevine));
- EXPECT_WVAVC1AAC(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", aac_codec(), kWidevine));
// Extended codecs.
@@ -943,23 +888,19 @@
EXPECT_WVAVC1(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc3_extended_codec(), kWidevineAlpha));
- // Invalid codec format: profile paramter must be present after the period.
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
+ // Invalid codec format, but canPlayType() strips away the period.
+ EXPECT_WVAVC1(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc1_dot_codec(), kWidevineAlpha));
- // Invalid or Non-MP4 codecs.
+ // Non-MP4 codecs.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", avc2_codec(), kWidevineAlpha));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "video/mp4", mp4a_invalid_no_extension(), kWidevineAlpha));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", vp8_codec(), kWidevineAlpha));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", unknown_codec(), kWidevineAlpha));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"video/mp4", mixed_codecs(), kWidevineAlpha));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "video/mp4", vp8_invalid_extension_codec(), kWidevineAlpha));
// Valid audio types.
EXPECT_WVMP4(IsSupportedKeySystemWithMediaMimeType(
@@ -980,14 +921,10 @@
"audio/mp4", avc1_and_aac_codecs(), kWidevineAlpha));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/mp4", avc3_codec(), kWidevineAlpha));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "audio/mp4", avc3_and_aac_codecs(), kWidevineAlpha));
- // Invalid or Non-MP4 codec.
+ // Non-MP4 codec.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
"audio/mp4", vorbis_codec(), kWidevineAlpha));
- EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "audio/mp4", mp4a_invalid_no_extension(), kWidevineAlpha));
}
IN_PROC_BROWSER_TEST_F(EncryptedMediaIsTypeSupportedWidevineTest,
« no previous file with comments | « no previous file | content/browser/media/media_canplaytype_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698