This will allow us to delete RemoveProprietaryMediaTypesAndCodecsForTests() from mime_util.h and unblocks enabling mp3 and mp4 in Chromium builds which currently breaks bunches of layout tests.
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/3323d0cc8bc471e6c2c354f854013df378165a33
commit 3323d0cc8bc471e6c2c354f854013df378165a33
Author: Łukasz Anforowicz <lukasza@chromium.org>
Date: Wed Dec 13 21:03:28 2017
Revert "Stop using findMediaFile(...) in LayoutTests"
This reverts commit 99e6ba383f1c2963eb5f3b93c5ef243c07a8240d.
Reason for revert: Caused test failures on Site Isolation Linux bot - https://crbug.com/794664 (as we're trying to make the bot's test steps part of CQ).
Original change's description:
> Stop using findMediaFile(...) in LayoutTests
>
> Historically, findMediaFile() helped choose the right extension based
> on what the browser could play. Chromium cannot play some proprietary
> formats (h264, aac, etc), so this check would choose the .ogv format
> in that case.
>
> But things have gotten crufty.
> 1) A long time ago we started running layout tests on builds that *do*
> include proprietary codecs
> 2) But we lie about that to the tests via
> media::RemoveProprietaryMediaTypesAndCodecsForTests()
> This makes debugging tests a pain because manual execution doesn't
> call this method and its easy to forget that the test wrapper does.
> 3) Lots of tests never bothered to call findMediaFile anway and just
> hardcoded the use of an mp4 with proprietary codecs, which worked
> because the method in #2 above only changes canPlayType responses,
> it doesn't remove the actual support for proprietary codecs.
> 4) findMediaFile is about to be busted anyway because it only queries the
> file mime type without supplying codec info. eg
> canPlayType("video/mp4") == "maybe" -> lets use the mp4!
> and even chromium will now "maybe" for this now that we no longer
> consider mp4 proprietary (though codecs like h264 still are!)
>
> So this patch does the following:
>
> 1) Deletes findMediaFile() and instead hardcode use of the ogg file. This
> maintains the existing behavior and avoids a massive rebaseline.
> 2) Delete media::RemoveProprietaryMediaTypesAndCodecsForTests(). Tests
> and manual runs now behave the same.
> 3) Delete ancient media-can-play-* LayoutTests that just call canPlayType
> with various codecs and are duplicated by content and chrome browser
> tests (which is a better place for these checks)
> 4) Updates mediasource-config-change-mp4-* expectations to expect that
> they should run and pass on *all* platforms (previously just android)
>
> There are still many tests that hard code the use of mp4 files. If we
> later desire to see LayoutTests run without proprietary codecs, someone
> can transition those tests. No one seems to mind at the moment.
>
> It is also not a goal to make LayoutTests try all the supported codecs.
> That is covered by unit/integration tests.
>
> Due to #2 above, a handful of tests in external/wpt/media-source now fail
> because they use mp4. Fixing these failures is tracked in Issue 794338.
>
> Change-Id: Ie357ae075c880b78d5ee9e95c1b7cc69d9d8a328
> BUG: 327115 , 746579 , 787575 , 568704 ,794338
> Reviewed-on: https://chromium-review.googlesource.com/807604
> Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
> Reviewed-by: Peter Beverloo <peter@chromium.org>
> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#523821}
TBR=dalecurtis@chromium.org,peter@chromium.org,chcunningham@chromium.org
Change-Id: I9ee4026ddb9876083a0d2c33f62c006888ca08c0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/825762
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523873}
Comment 1 by dalecur...@chromium.org
, Nov 21 2017