Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <!DOCTYPE html> |
| 2 <head> | 2 <title>Test that the painted buffered range contains currentTime.</title> |
| 3 <script src=../../media-resources/media-file.js></script> | 3 <script src="../resources/testharness.js"></script> |
|
fs
2016/08/11 16:53:20
Not really using this?
Srirama
2016/08/11 18:17:38
Yes, not using. I have experimented so much and fi
| |
| 4 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 | 4 <script src="../resources/testharnessreport.js"></script> |
| 5 (Please avoid writing new tests using video-test.js) --> | 5 <script src="../../media-resources/media-file.js"></script> |
| 6 <script src=../../media-resources/video-test.js></script> | 6 <body> |
| 7 <script> | 7 <video controls></video> |
| 8 if (window.testRunner) | 8 <script> |
| 9 testRunner.dumpAsTextWithPixelResults(); // To get pixels. | 9 var video = document.querySelector("video"); |
| 10 | 10 |
| 11 function start() { | 11 testRunner.dumpAsTextWithPixelResults(); |
| 12 findMediaElement(); | 12 testRunner.waitUntilDone(); |
| 13 video.onended = function() { | |
| 14 testRunner.notifyDone(); | |
| 15 }; | |
| 13 | 16 |
| 14 waitForEventAndEnd('ended'); | 17 video.onseeked = function() { |
| 15 waitForEvent('seeked', function() { | 18 video.play(); |
| 16 video.play(); | 19 }; |
| 17 }); | |
| 18 waitForEvent('loadedmetadata', function() { | |
| 19 video.currentTime = video.duration - 0.5; | |
| 20 } ); | |
| 21 | 20 |
| 22 var mediaFile = findMediaFile("audio", "../../../media/content/tes t"); | 21 video.onloadedmetadata = function() { |
| 23 var type = mimeTypeForExtension(mediaFile.split('.').pop()); | 22 video.currentTime = video.duration - 0.5; |
| 24 video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi? name=" + mediaFile + "&throttle=50&nph=1&type=" + type; | 23 }; |
| 25 video.load(); | 24 |
| 26 } | 25 var mediaFile = findMediaFile("audio", "../../../media/content/test"); |
| 27 </script> | 26 var type = mimeTypeForExtension(mediaFile.split(".").pop()); |
| 28 </head> | 27 video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?name=" + media File + "&throttle=50&nph=1&type=" + type; |
| 29 <body onload="start()"> | 28 </script> |
| 30 <video controls></video> | |
| 31 <p>Test that the painted buffered range contains currentTime.</p> | |
| 32 </body> | |
| 33 </html> | |
| OLD | NEW |