Add some performance tests for various aspects of media loading and playback.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Nov 2016 17:22:30 +0000 (17:22 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Nov 2016 17:22:30 +0000 (17:22 +0000)
commitd56e08794897fa7254719837ca05d4e9c80291a7
tree7343e9d78d18353f4f41dff385558379d8375278
parentd4a882e8f3e0e787f5178c821729fd2a5576fcf9
Add some performance tests for various aspects of media loading and playback.
https://bugs.webkit.org/show_bug.cgi?id=164977

Reviewed by Darin Adler.

PerformanceTests:

Add new tests for a few aspects of media playback; namely: how quickly  media elements fire
the "canplaythrough" event when all data is immediately available, how quickly HLS playback
switches resolutions, and at what playback rate MSE-backed video can play without dropping
frames. Skip these tests by default, as they're not runnable on all ports, and they require
a webserver (run-webkit-httpd) to complete on macOS.

* Media/HLSCanPlayThrough.html: Added.
* Media/HLSGearChange.html: Added.
* Media/MSECanPlayThrough.html: Added.
* Media/MSEPlaybackRate.html: Added.
* Media/StandardCanPlayThrough.html: Added.
* Media/hls/1080p/iframe_index.m3u8: Added.
* Media/hls/1080p/prog_index.m3u8: Added.
* Media/hls/1080p/test.ts: Added.
* Media/hls/480p/iframe_index.m3u8: Added.
* Media/hls/480p/prog_index.m3u8: Added.
* Media/hls/480p/test.ts: Added.
* Media/hls/720p/iframe_index.m3u8: Added.
* Media/hls/720p/prog_index.m3u8: Added.
* Media/hls/720p/test.ts: Added.
* Media/hls/720p/test.ts.back: Added.
* Media/hls/index.m3u8: Added.
* Media/media-source-loader.js: Added.
(MediaSourceLoader):
(MediaSourceLoader.prototype.loadManifest):
(MediaSourceLoader.prototype.loadManifestSucceeded):
(MediaSourceLoader.prototype.loadManifestFailed):
(MediaSourceLoader.prototype.loadMediaData):
(MediaSourceLoader.prototype.loadMediaDataSucceeded):
(MediaSourceLoader.prototype.loadMediaDataFailed):
(MediaSourceLoader.prototype.get type):
(MediaSourceLoader.prototype.get duration):
(MediaSourceLoader.prototype.get initSegment):
(MediaSourceLoader.prototype.get mediaSegmentsLength):
(MediaSourceLoader.prototype.mediaSegments):
(MediaSourceLoader.prototype.get everyMediaSegment):
* Media/test-fragmented-video.json: Added.
* Media/test-fragmented-video.mp4: Added.
* Media/test.mp4: Added.
* Skipped:

Tools:

Allow callers to pass in extra alias/directory pairs to run-webkit-httpd.

* Scripts/run-webkit-httpd:
(parse_args):
(main):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
38 files changed:
PerformanceTests/ChangeLog
PerformanceTests/Media/HLSCanPlayThrough.html [new file with mode: 0644]
PerformanceTests/Media/HLSGearChange.html [new file with mode: 0644]
PerformanceTests/Media/MSECanPlayThrough.html [new file with mode: 0644]
PerformanceTests/Media/MSEPlaybackRate.html [new file with mode: 0644]
PerformanceTests/Media/StandardCanPlayThrough.html [new file with mode: 0644]
PerformanceTests/Media/hls/1080p/iframe_index.m3u8 [new file with mode: 0644]
PerformanceTests/Media/hls/1080p/prog_index.m3u8 [new file with mode: 0644]
PerformanceTests/Media/hls/1080p/test.ts [new file with mode: 0644]
PerformanceTests/Media/hls/1080p/test1.ts [new symlink]
PerformanceTests/Media/hls/1080p/test2.ts [new symlink]
PerformanceTests/Media/hls/1080p/test3.ts [new symlink]
PerformanceTests/Media/hls/1080p/test4.ts [new symlink]
PerformanceTests/Media/hls/1080p/test5.ts [new symlink]
PerformanceTests/Media/hls/480p/iframe_index.m3u8 [new file with mode: 0644]
PerformanceTests/Media/hls/480p/prog_index.m3u8 [new file with mode: 0644]
PerformanceTests/Media/hls/480p/test.ts [new file with mode: 0644]
PerformanceTests/Media/hls/480p/test1.ts [new symlink]
PerformanceTests/Media/hls/480p/test2.ts [new symlink]
PerformanceTests/Media/hls/480p/test3.ts [new symlink]
PerformanceTests/Media/hls/480p/test4.ts [new symlink]
PerformanceTests/Media/hls/480p/test5.ts [new symlink]
PerformanceTests/Media/hls/720p/iframe_index.m3u8 [new file with mode: 0644]
PerformanceTests/Media/hls/720p/prog_index.m3u8 [new file with mode: 0644]
PerformanceTests/Media/hls/720p/test.ts [new file with mode: 0644]
PerformanceTests/Media/hls/720p/test1.ts [new symlink]
PerformanceTests/Media/hls/720p/test2.ts [new symlink]
PerformanceTests/Media/hls/720p/test3.ts [new symlink]
PerformanceTests/Media/hls/720p/test4.ts [new symlink]
PerformanceTests/Media/hls/720p/test5.ts [new symlink]
PerformanceTests/Media/hls/index.m3u8 [new file with mode: 0644]
PerformanceTests/Media/media-source-loader.js [new file with mode: 0644]
PerformanceTests/Media/test-fragmented-video.json [new file with mode: 0644]
PerformanceTests/Media/test-fragmented-video.mp4 [new file with mode: 0644]
PerformanceTests/Media/test.mp4 [new file with mode: 0644]
PerformanceTests/Skipped
Tools/ChangeLog
Tools/Scripts/run-webkit-httpd