Bug 1370976 - Add webm MediaMIMEType gtest. r=gerald
authorRalph Giles <giles@mozilla.com>
Wed, 31 May 2017 13:35:15 -0700
changeset 411191 7d58abacf87b29394def7cf7a4c9d51df9a5fc28
parent 411190 0900434f24159cea6699b4f5db57b23425208686
child 411192 78b1221a307d768c75f75fdb4bc9386ce93a9210
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1370976
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1370976 - Add webm MediaMIMEType gtest. r=gerald Make sure we test the other major container we need to parse correctly. MozReview-Commit-ID: AnrGADFXPkw
dom/media/gtest/TestMediaMIMETypes.cpp
--- a/dom/media/gtest/TestMediaMIMETypes.cpp
+++ b/dom/media/gtest/TestMediaMIMETypes.cpp
@@ -179,17 +179,19 @@ TEST(MediaMIMETypes, MediaExtendedMIMETy
     bool mEqualsLiteralVideoSlashMp4; // tests `== "video/mp4"`
     bool mHaveCodecs;
   } tests[] =
   { // in                    Type().AsString  app    audio  video ==v/mp4 codecs
     { "video/mp4",           "video/mp4",     false, false, true,  true,  false },
     { "video/mp4; codecs=0", "video/mp4",     false, false, true,  true,  true  },
     { "VIDEO/MP4",           "video/mp4",     false, false, true,  true,  false },
     { "audio/mp4",           "audio/mp4",     false, true,  false, false, false },
-    { "application/x",       "application/x", true, false,  false, false, false }
+    { "video/webm",          "video/webm",    false, false, true,  false, false },
+    { "audio/webm",          "audio/webm",    false, true,  false, false, false },
+    { "application/x",       "application/x", true,  false, false, false, false }
   };
 
   for (const auto& test : tests) {
     Maybe<MediaExtendedMIMEType> type = MakeMediaExtendedMIMEType(test.mTypeString);
     EXPECT_TRUE(type.isSome())
       << "MakeMediaExtendedMIMEType(\"" << test.mTypeString << "\").isSome()";
     EXPECT_TRUE(type->OriginalString().EqualsASCII(test.mTypeString))
       << "MakeMediaExtendedMIMEType(\"" << test.mTypeString << "\")->AsString() == \"" << test.mTypeAsString << "\"";