Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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}
- Loading branch information