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

Unified Diff: media/base/mime_util_unittest.cc

Issue 1624703002: Implement support for vp9 in ISO-BMFF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: media/base/mime_util_unittest.cc
diff --git a/media/base/mime_util_unittest.cc b/media/base/mime_util_unittest.cc
index 34a2ea3a33aff50c604ee4e62752191749566c0f..879851fbe5ddfec1863db2adc38bf446d9cc357d 100644
--- a/media/base/mime_util_unittest.cc
+++ b/media/base/mime_util_unittest.cc
@@ -111,4 +111,45 @@ TEST(MimeUtilTest, ParseCodecString) {
EXPECT_EQ("mp4a.40.2", codecs_out[1]);
}
+TEST(MimeUtilTest, AreSupportedMediaCodecs) {
ddorwin 2016/01/27 01:39:15 These things are tested in content/browser/media/m
kqyang 2016/01/29 00:34:17 I think these things should really be tested here
+#if defined(USE_PROPRIETARY_CODECS)
+ EXPECT_TRUE(AreSupportedMediaCodecs({"vp08"}));
ddorwin 2016/01/27 01:39:15 There are no extended tests for vp8.
kqyang 2016/01/29 00:34:17 Added.
+ EXPECT_TRUE(AreSupportedMediaCodecs({"vp09"}));
+ EXPECT_TRUE(AreSupportedMediaCodecs({"vp09.00.01.08"}));
+ EXPECT_FALSE(AreSupportedMediaCodecs({"vp09.0x.01.08"}));
+ EXPECT_FALSE(AreSupportedMediaCodecs({"vp09.00.-1.08"}));
+ EXPECT_TRUE(AreSupportedMediaCodecs({"vp09.01.01.08.02.01.01.00"}));
+ EXPECT_FALSE(AreSupportedMediaCodecs({"vp09.01.01.08.02.01.01.00.00"}));
+#endif // USE_PROPRIETARY_CODECS
+}
+
+TEST(MimeUtilTest, IsSupportedStrictMediaMimeType) {
+#if defined(USE_PROPRIETARY_CODECS)
+ EXPECT_EQ(MayBeSupported,
+ IsSupportedStrictMediaMimeType("video/mp4", {"vp08"}));
+ EXPECT_EQ(MayBeSupported,
+ IsSupportedStrictMediaMimeType("video/mp4", {"vp09"}));
+ EXPECT_EQ(MayBeSupported,
+ IsSupportedStrictMediaMimeType("video/mp4", {"vp09.00.01.08"}));
+ EXPECT_EQ(IsNotSupported,
+ IsSupportedStrictMediaMimeType("video/mp4", {"vp09.00.-1.08"}));
+ EXPECT_EQ(IsSupported, IsSupportedStrictMediaMimeType(
+ "video/mp4", {"vp09.01.01.08.02.01.01.00"}));
+ EXPECT_EQ(MayBeSupported, IsSupportedStrictMediaMimeType(
+ "video/mp4", {"vp09.01.01..02.01.01.00"}));
+ EXPECT_EQ(IsSupported, IsSupportedStrictMediaMimeType(
+ "video/mp4", {"vp09.01.01.08.04.03.00.00"}));
+ EXPECT_EQ(MayBeSupported,
+ IsSupportedStrictMediaMimeType("video/mp4", {"vp09.04"}));
+ EXPECT_EQ(MayBeSupported, IsSupportedStrictMediaMimeType(
+ "video/mp4", {"vp09.01.01.09.02.01.01.00"}));
+ EXPECT_EQ(MayBeSupported, IsSupportedStrictMediaMimeType(
+ "video/mp4", {"vp09.01.01.08.05.01.01"}));
+ EXPECT_EQ(MayBeSupported, IsSupportedStrictMediaMimeType(
+ "video/mp4", {"vp09.01.01.08.04.04.00.00"}));
+ EXPECT_EQ(MayBeSupported, IsSupportedStrictMediaMimeType(
+ "video/mp4", {"vp09.01.01.08.04.03.02.00"}));
+#endif // USE_PROPRIETARY_CODECS
+}
+
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698