OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <title>Test currentTime values when setting while readystate is HAVE_NOTHING for
media fragment URI.</title> |
3 <head> | 3 <script src="../resources/testharness.js"></script> |
4 <title>Test currentTime values when setting while HAVE_NOTHING for media
fragment URI.</title> | 4 <script src="../resources/testharnessreport.js"></script> |
5 </head> | 5 <script src="media-file.js"></script> |
6 <body> | 6 <video></video> |
7 <video id="video"></video> | 7 <script> |
8 <script src=media-file.js></script> | 8 async_test(function(t) { |
9 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 | 9 var video = document.querySelector("video"); |
10 (Please avoid writing new tests using video-test.js) --> | 10 video.src = findMediaFile("video", "content/test") + "#t=2"; |
11 <script src=video-test.js></script> | 11 assert_equals(video.currentTime, 0); |
12 <script> | 12 video.currentTime = 1; |
13 video = document.getElementById('video'); | |
14 | 13 |
15 video.src = findMediaFile("video", "content/test") + "#t=2"; | 14 video.onloadedmetadata = t.step_func(function() { |
16 testExpected("video.currentTime", 0); | 15 assert_equals(video.currentTime, 1); |
17 video.currentTime = 1; | 16 }); |
18 | 17 |
19 waitForEvent('loadedmetadata', function() | 18 video.onseeked = t.step_func_done(); |
20 { | 19 }); |
21 testExpected("video.currentTime", 1); | 20 </script> |
22 }); | |
23 | |
24 waitForEventAndEnd('seeked'); | |
25 </script> | |
26 </body> | |
27 </html> | |
OLD | NEW |