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

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

Issue 1715303002: Add TODOs to convert from video-test.js to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug ref Created 4 years, 10 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 </head> 3 </head>
4 <body onload="start()"> 4 <body onload="start()">
5 <p>Start playing a video with preloading enabled, do a seek near the 5 <p>Start playing a video with preloading enabled, do a seek near the
6 end and check multiple buffered timeranges have been created.</p> 6 end and check multiple buffered timeranges have been created.</p>
7 <video id="video" preload="auto" autobuffer></video> 7 <video id="video" preload="auto" autobuffer></video>
8 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
9 (Please avoid writing new tests using video-test.js) -->
8 <script src=../../media-resources/video-test.js></script> 10 <script src=../../media-resources/video-test.js></script>
9 <script src=../../media-resources/media-file.js></script> 11 <script src=../../media-resources/media-file.js></script>
10 <script> 12 <script>
11 waitForEvent("ended", ended); 13 waitForEvent("ended", ended);
12 waitForEventOnce('playing', function() { 14 waitForEventOnce('playing', function() {
13 testExpected("video.buffered.length", 1, "=="); 15 testExpected("video.buffered.length", 1, "==");
14 run("video.currentTime = video.duration - 0.5"); 16 run("video.currentTime = video.duration - 0.5");
15 }); 17 });
16 18
17 function ended() { 19 function ended() {
18 testExpected("video.buffered.length", 2, "=="); 20 testExpected("video.buffered.length", 2, "==");
19 endTest(); 21 endTest();
20 } 22 }
21 23
22 function start () { 24 function start () {
23 video = document.getElementById('video'); 25 video = document.getElementById('video');
24 var mediaFile = findMediaFile("audio", "../../../media/content/test"); 26 var mediaFile = findMediaFile("audio", "../../../media/content/test");
25 var type = mimeTypeForExtension(mediaFile.split('.').pop()); 27 var type = mimeTypeForExtension(mediaFile.split('.').pop());
26 video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?nph=1& name=" + mediaFile + "&throttle=100&type=" + type; 28 video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?nph=1& name=" + mediaFile + "&throttle=100&type=" + type;
27 29
28 video.play(); 30 video.play();
29 } 31 }
30 </script> 32 </script>
31 </body> 33 </body>
32 </html> 34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698