Backed out changeset 939ecf1b80cb (bug 1398102) for failing mda's dom/media/test/test_can_play_type_wave.html. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 12 Sep 2017 11:03:50 +0200
changeset 429751 1c376c20595a1468a84fbfc4ef23558a4577571a
parent 429750 a99fc334476f35e767f7ab1e8c761b5311e18b6d
child 429752 803f854237c1408d652d02dbcad0900f12a05960
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1398102
milestone57.0a1
backs out939ecf1b80cbd72a1a908a68578c92811b3a5ead
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
Backed out changeset 939ecf1b80cb (bug 1398102) for failing mda's dom/media/test/test_can_play_type_wave.html. r=backout
dom/html/HTMLMediaElement.cpp
testing/web-platform/meta/html/semantics/embedded-content/media-elements/mime-types/canPlayType.html.ini
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -4642,27 +4642,16 @@ HTMLMediaElement::GetCanPlay(const nsASt
   if (status == CANPLAY_YES && IsVP9InMP4(*containerType)) {
     // We don't have a demuxer that can handle VP9 in non-fragmented MP4.
     // So special-case VP9 in MP4 here, as we assume canPlayType() implies
     // non-fragmented MP4 anyway. Note we report that we can play VP9
     // in MP4 in MediaSource.isTypeSupported(), as the fragmented MP4
     // demuxer can handle VP9 in fragmented MP4.
     return CANPLAY_NO;
   }
-  if (status == CANPLAY_YES &&
-      (*containerType).ExtendedType().Codecs().IsEmpty()) {
-    // Per spec: 'Generally, a user agent should never return "probably" for a
-    // type that allows the `codecs` parameter if that parameter is not present.'
-    // As all our currently-supported types allow for `codecs`, we can do this
-    // check here.
-    // TODO: Instead, missing `codecs` should be checked in each decoder's
-    // `IsSupportedType` call from `CanHandleCodecsType()`.
-    // See bug 1399023.
-    return CANPLAY_MAYBE;
-  }
   return status;
 }
 
 NS_IMETHODIMP
 HTMLMediaElement::CanPlayType(const nsAString& aType, nsAString& aResult)
 {
   DecoderDoctorDiagnostics diagnostics;
   CanPlayStatus canPlay = GetCanPlay(aType, &diagnostics);
@@ -4670,22 +4659,20 @@ HTMLMediaElement::CanPlayType(const nsAS
     OwnerDoc(), aType, canPlay != CANPLAY_NO, __func__);
   switch (canPlay) {
   case CANPLAY_NO:
     aResult.Truncate();
     break;
   case CANPLAY_YES:
     aResult.AssignLiteral("probably");
     break;
+  default:
   case CANPLAY_MAYBE:
     aResult.AssignLiteral("maybe");
     break;
-  default:
-    MOZ_ASSERT_UNREACHABLE("Unexpected case.");
-    break;
   }
 
   LOG(LogLevel::Debug, ("%p CanPlayType(%s) = \"%s\"", this,
                      NS_ConvertUTF16toUTF8(aType).get(),
                      NS_ConvertUTF16toUTF8(aResult).get()));
 
   return NS_OK;
 }
--- a/testing/web-platform/meta/html/semantics/embedded-content/media-elements/mime-types/canPlayType.html.ini
+++ b/testing/web-platform/meta/html/semantics/embedded-content/media-elements/mime-types/canPlayType.html.ini
@@ -1,24 +1,34 @@
 [canPlayType.html]
   type: testharness
+  [audio/mp4 (optional)]
+    expected:
+      if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
+      if debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
+
   [audio/mp4; codecs="mp4a.40.2" (optional)]
     expected:
       if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
       if debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
 
   [video/3gpp (optional)]
     expected: FAIL
 
   [video/3gpp; codecs="samr" (optional)]
     expected: FAIL
 
   [video/3gpp; codecs="mp4v.20.8" (optional)]
     expected: FAIL
 
+  [video/mp4 (optional)]
+    expected:
+      if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
+      if debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
+
   [video/mp4; codecs="mp4a.40.2" (optional)]
     expected:
       if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
       if debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
 
   [video/mp4; codecs="avc1.42E01E" (optional)]
     expected:
       if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL