Rebaseline LayoutReloaded patch file (collectRenderersWithNeedsLayout).
[WebKit-https.git] / PerformanceTests / Media / HLSCanPlayThrough.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/runner.js"></script>
5 <script>
6 var video;
7 var url;
8
9 window.addEventListener('load', () => {
10     PerfTestRunner.prepareToMeasureValuesAsync({
11         unit: 'ms',
12         done: function () {
13             if (video) {
14                 video.src = null;
15                 video.load();
16             }
17         }
18     });
19
20     runTest();
21 });
22
23 function runTest() {   
24     video =  document.createElement('video');
25
26     var startTime = PerfTestRunner.now();
27     video.src = 'hls/720p/prog_index.m3u8';
28     video.addEventListener('canplaythrough', () => {
29         if (!PerfTestRunner.measureValueAsync(PerfTestRunner.now() - startTime))
30             return;
31
32         PerfTestRunner.gc();
33         setTimeout(runTest, 0);
34     });
35 }
36
37 </script>
38 </head>
39 <body>
40     <button onclick="pauseAll()">pause</button><button onclick="playAll()">play</button><br>
41 </body>
42 </html>