Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/media/video-buffered-range-contains-currentTime.html

Issue 2425463002: Improve HTMLMediaElement::currentTime() (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Test that the painted buffered range contains currentTime.</title> 2 <title>Test that the painted buffered range contains currentTime.</title>
3 <script src="../../media-resources/media-file.js"></script> 3 <script src="../../media-resources/media-file.js"></script>
4 <video controls></video> 4 <video controls></video>
5 <script> 5 <script>
6 var video = document.querySelector("video"); 6 var video = document.querySelector("video");
7 7
8 testRunner.waitUntilDone(); 8 if (window.testRunner) {
9 testRunner.waitUntilDone();
10 }
11
9 video.onended = function() { 12 video.onended = function() {
13 if (window.testRunner) {
10 testRunner.notifyDone(); 14 testRunner.notifyDone();
15 }
11 }; 16 };
12 17
13 video.onseeked = function() { 18 video.onseeked = function() {
14 video.play(); 19 video.play();
15 }; 20 };
16 21
17 video.onloadedmetadata = function() { 22 video.onloadedmetadata = function() {
18 video.currentTime = video.duration - 0.5; 23 video.currentTime = video.duration - 0.5;
19 }; 24 };
20 25
21 var mediaFile = findMediaFile("audio", "../../../media/content/test"); 26 var mediaFile = findMediaFile("audio", "../../../media/content/test");
22 var type = mimeTypeForExtension(mediaFile.split(".").pop()); 27 var type = mimeTypeForExtension(mediaFile.split(".").pop());
23 video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?name=" + media File + "&throttle=5000&nph=1&type=" + type; 28 video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?name=" + media File + "&throttle=5000&nph=1&type=" + type;
24 </script> 29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698