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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/media/progress-events-generated-correctly.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 <video controls></video> 1 <video controls></video>
2 <p>Test that progress events are generated during loading of media resource.</p> 2 <p>Test that progress events are generated during loading of media resource.</p>
3 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
4 (Please avoid writing new tests using video-test.js) -->
3 <script src=../../media-resources/video-test.js></script> 5 <script src=../../media-resources/video-test.js></script>
4 <script src=../../media-resources/media-file.js></script> 6 <script src=../../media-resources/media-file.js></script>
5 <script> 7 <script>
6 waitForEventAndFail('error'); 8 waitForEventAndFail('error');
7 9
8 // Given long enough duration, We should not reach ended playback state. 10 // Given long enough duration, We should not reach ended playback state.
9 waitForEventAndFail('ended'); 11 waitForEventAndFail('ended');
10 12
11 // Tuned throttling should not induce player stall or suspended load. 13 // Tuned throttling should not induce player stall or suspended load.
12 waitForEventAndFail('stalled'); 14 waitForEventAndFail('stalled');
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 var mediaFile = findMediaFile('video', 'resources/test'); 93 var mediaFile = findMediaFile('video', 'resources/test');
92 var mimeType = mimeTypeForFile(mediaFile); 94 var mimeType = mimeTypeForFile(mediaFile);
93 // Assumes minimum file size selected is > 100 kB. 95 // Assumes minimum file size selected is > 100 kB.
94 // At least 4*maxProgressFiringIntervalInMS is how long we want to stretch t he full 96 // At least 4*maxProgressFiringIntervalInMS is how long we want to stretch t he full
95 // loading, because we perform checks after 3 of these intervals while still 97 // loading, because we perform checks after 3 of these intervals while still
96 // loading. 100 kB over 2.2 seconds is 45 kBps. 98 // loading. 100 kB over 2.2 seconds is 45 kBps.
97 var kBps = 45; 99 var kBps = 45;
98 100
99 video.src = 'video-throttled-load.cgi' + '?name=' + mediaFile + '&throttle=' + kBps + '&type=' + mimeType; 101 video.src = 'video-throttled-load.cgi' + '?name=' + mediaFile + '&throttle=' + kBps + '&type=' + mimeType;
100 </script> 102 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698