OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src=../../media-resources/media-file.js></script> | 3 <script src=../../media-resources/media-file.js></script> |
4 <script src=../../media-resources/video-test.js></script> | 4 <script src=../../media-resources/video-test.js></script> |
5 <script> | 5 <script> |
6 if (window.testRunner) | 6 if (window.testRunner) |
7 testRunner.dumpAsText(true); // To get pixels. | 7 testRunner.dumpAsTextWithPixelResults(); // To get pixels. |
8 | 8 |
9 function start() { | 9 function start() { |
10 findMediaElement(); | 10 findMediaElement(); |
11 | 11 |
12 waitForEventAndEnd('ended'); | 12 waitForEventAndEnd('ended'); |
13 waitForEvent('seeked', function() { | 13 waitForEvent('seeked', function() { |
14 video.play(); | 14 video.play(); |
15 }); | 15 }); |
16 waitForEvent('loadedmetadata', function() { | 16 waitForEvent('loadedmetadata', function() { |
17 video.currentTime = video.duration - 0.5; | 17 video.currentTime = video.duration - 0.5; |
18 } ); | 18 } ); |
19 | 19 |
20 var mediaFile = findMediaFile("audio", "../../../media/content/tes
t"); | 20 var mediaFile = findMediaFile("audio", "../../../media/content/tes
t"); |
21 var type = mimeTypeForExtension(mediaFile.split('.').pop()); | 21 var type = mimeTypeForExtension(mediaFile.split('.').pop()); |
22 video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?
name=" + mediaFile + "&throttle=50&nph=1&type=" + type; | 22 video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?
name=" + mediaFile + "&throttle=50&nph=1&type=" + type; |
23 video.load(); | 23 video.load(); |
24 } | 24 } |
25 </script> | 25 </script> |
26 </head> | 26 </head> |
27 <body onload="start()"> | 27 <body onload="start()"> |
28 <video controls></video> | 28 <video controls></video> |
29 <p>Test that the painted buffered range contains currentTime.</p> | 29 <p>Test that the painted buffered range contains currentTime.</p> |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |