Closed Bug 1474502 Opened 7 years ago Closed 7 years ago

[wpt-sync] Sync PR 11876 - [html] Reduce test duration

Categories

(Core :: Audio/Video: Playback, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 11876 into mozilla-central (this bug is closed when the sync is complete). PR: https://github.com/web-platform-tests/wpt/pull/11876 Details from upstream follow. Mike Pennisi <mike@mikepennisi.com> wrote: > [html] Reduce test duration > > The `audio_loop_base.html` and `video_loop_base.html` tests were written > to verify playback looping, making it necessary to play a given media > file in its entirety. > > Prior to the application of this patch, the modified tests were among > the longest-running tests in WPT [1]. Because media files of any > duration may be used to validate playback looping, the selected files' > 4-second duration was unnecessary. > > Introduce media procedurally-generated media files with minimal duration. > Update the tests to reference these new files, drastically reducing the > time required to execute them. > > The files were created via the following commands (using ffmpeg version > 2.8.14): > > $ ffmpeg -f lavfi -i anullsrc=r=44100:cl=mono -t 0.05 -q:a 9 -acodec libmp3lame media/sound_0.mp3 > $ ffmpeg -f lavfi -i anullsrc=r=44100:cl=mono -t 0.05 -q:a 9 -acodec libvorbis media/sound_0.oga > > $ ffmpeg \ > -f lavfi \ > -i anullsrc=r=44100:cl=mono -ac 1 \ > -i media/1x1-green.png -loop 1 -vframes 1 -pix_fmt yuv420p -vf scale=2:2 \ > -shortest -acodec libmp3lame -vcodec libx264 -map 0:a -map 1:v \ > media/2x2-green.mp4 > $ ffmpeg \ > -f lavfi \ > -i anullsrc=r=44100:cl=mono -ac 1 \ > -i media/1x1-green.png -vframes 1 -pix_fmt yuv420p -vf scale=2:2 \ > -shortest -acodec libvorbis -vcodec libtheora -q:a 9 -map 0:a -map 1:v \ > media/2x2-green.ogv > > [1] https://github.com/web-platform-tests/wpt/issues/11571 > > --- > > The following command runs the tests in Firefox and outputs information about > the result: > > $ ./wpt run --log-wptreport >(python -m json.tool | awk '/"duration"/,/"test"/ {print}') firefox html/semantics/embedded-content/media-elements/{audio,video}_loop_base.html > > Run against `master`, it produces the following output: > > "duration": 12087, > "message": null, > "status": "OK", > "subtests": [ > { > "message": null, > "name": "Check if video.loop is set to true that expecting the seeking event is fired more than once", > "status": "PASS" > } > ], > "test": "/html/semantics/embedded-content/media-elements/video_loop_base.html" > "duration": 10753, > "message": null, > "status": "OK", > "subtests": [ > { > "message": null, > "name": "Check if audio.loop is set to true that expecting the seeking event is fired more than once", > "status": "PASS" > } > ], > "test": "/html/semantics/embedded-content/media-elements/audio_loop_base.html" > > With this patch applied, the tests continue to pass, but they do so with a much > shorter duration: > > "duration": 820, > "message": null, > "status": "OK", > "subtests": [ > { > "message": null, > "name": "Check if video.loop is set to true that expecting the seeking event is fired more than once", > "status": "PASS" > } > ], > "test": "/html/semantics/embedded-content/media-elements/video_loop_base.html" > "duration": 1147, > "message": null, > "status": "OK", > "subtests": [ > { > "message": null, > "name": "Check if audio.loop is set to true that expecting the seeking event is fired more than once", > "status": "PASS" > } > ], > "test": "/html/semantics/embedded-content/media-elements/audio_loop_base.html"
Component: web-platform-tests → Audio/Video: Playback
Product: Testing → Core
Ran 2 tests and 2 subtests OK : 2 PASS : 2
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/00994e529745 [wpt PR 11876] - [html] Reduce test duration, a=testonly
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.