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

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

Issue 2196673002: Convert video-buffer* http tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 years, 4 months 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/media/video-buffered-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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="../../media-resources/media-file.js"></script>
4 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 4 <video controls></video>
5 (Please avoid writing new tests using video-test.js) --> 5 <script>
6 <script src=../../media-resources/video-test.js></script> 6 var video = document.querySelector("video");
7 <script>
8 if (window.testRunner)
9 testRunner.dumpAsTextWithPixelResults(); // To get pixels.
10 7
11 function start() { 8 testRunner.waitUntilDone();
12 findMediaElement(); 9 video.onended = function() {
10 testRunner.notifyDone();
11 };
13 12
14 waitForEventAndEnd('ended'); 13 video.onseeked = function() {
15 waitForEvent('seeked', function() { 14 video.play();
16 video.play(); 15 };
17 });
18 waitForEvent('loadedmetadata', function() {
19 video.currentTime = video.duration - 0.5;
20 } );
21 16
22 var mediaFile = findMediaFile("audio", "../../../media/content/tes t"); 17 video.onloadedmetadata = function() {
23 var type = mimeTypeForExtension(mediaFile.split('.').pop()); 18 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; 19 };
25 video.load(); 20
26 } 21 var mediaFile = findMediaFile("audio", "../../../media/content/test");
27 </script> 22 var type = mimeTypeForExtension(mediaFile.split(".").pop());
28 </head> 23 video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?name=" + media File + "&throttle=5000&nph=1&type=" + type;
29 <body onload="start()"> 24 </script>
30 <video controls></video>
31 <p>Test that the painted buffered range contains currentTime.</p>
32 </body>
33 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/media/video-buffered-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698