OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body onload="start()"> | 3 <body onload="start()"> |
4 <p>Load a video with an infinite duration. Start playback and ensure | 4 <p>Load a video with an infinite duration. Start playback and ensure |
5 video.currentTime < video.buffered.end(0) upon first timeupdate.</p> | 5 video.currentTime < video.buffered.end(0) upon first timeupdate.</p> |
6 <video></video> | 6 <video></video> |
| 7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 8 (Please avoid writing new tests using video-test.js) --> |
7 <script src="video-test.js"></script> | 9 <script src="video-test.js"></script> |
8 <script src="media-file.js"></script> | 10 <script src="media-file.js"></script> |
9 <script> | 11 <script> |
10 waitForEventOnce('timeupdate', function() { | 12 waitForEventOnce('timeupdate', function() { |
11 video.pause(); | 13 video.pause(); |
12 | 14 |
13 testExpected('video.duration', Infinity, '=='); | 15 testExpected('video.duration', Infinity, '=='); |
14 testExpected('video.buffered.start(0)', 0, '>='); | 16 testExpected('video.buffered.start(0)', 0, '>='); |
15 | 17 |
16 // 10 seconds chosen arbitrarily as it's larger than the duration, but | 18 // 10 seconds chosen arbitrarily as it's larger than the duration, but |
(...skipping 12 matching lines...) Expand all Loading... |
29 testExpected('video.duration', Infinity, '=='); | 31 testExpected('video.duration', Infinity, '=='); |
30 video.play(); | 32 video.play(); |
31 }); | 33 }); |
32 | 34 |
33 function start() { | 35 function start() { |
34 video.src = 'resources/test-live.webm'; | 36 video.src = 'resources/test-live.webm'; |
35 } | 37 } |
36 </script> | 38 </script> |
37 </body> | 39 </body> |
38 </html> | 40 </html> |
OLD | NEW |