OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <title>video with a postive start time</title> | |
3 <script src="../resources/testharness.js"></script> | |
4 <script src="../resources/testharnessreport.js"></script> | |
5 <div id="log"></div> | |
6 <video controls></video> | |
7 <script> | |
8 async_test(function(t) { | |
9 var video = document.querySelector('video'); | |
10 video.src = 'resources/test-positive-start-time.webm'; | |
11 | |
12 var seekTime = 5; | |
13 | |
14 // Verify initial start time is correct. | |
15 video.onloadeddata = t.step_func(function() { | |
16 console.log(video.currentTime); | |
philipj_slow
2014/09/18 20:07:43
Why console.log here? Will it should up somewhere?
DaleCurtis
2014/09/18 20:17:11
Whoops, that's an accidental include on my part. S
| |
17 assert_equals(video.currentTime, 4.253, 'currentTime'); | |
18 video.currentTime = seekTime; | |
philipj_slow
2014/09/18 20:07:43
Verifying that seeking works as expected is good,
DaleCurtis
2014/09/18 20:17:12
I had trouble running multiple tests in the same f
philipj_slow
2014/09/18 20:38:17
My thought was simply having multiple files, but i
| |
19 }); | |
20 | |
21 // Verify the seeked location matches the timestamps in the file. | |
22 video.onseeked = t.step_func(function() { | |
23 console.log(video.currentTime); | |
24 assert_equals(video.currentTime, seekTime, 'currentTime'); | |
25 // FIXME: Once Chrome correctly exposes seekable ranges for media with | |
26 // positive start times, verify video.seekable.start(0) here. | |
27 t.done(); | |
28 }) | |
29 }); | |
30 </script> | |
OLD | NEW |