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