Index: LayoutTests/media/video-positive-start-time.html |
diff --git a/LayoutTests/media/video-positive-start-time.html b/LayoutTests/media/video-positive-start-time.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3f0e6fd2af6574915a2d57c0e8802f69c4e2a23c |
--- /dev/null |
+++ b/LayoutTests/media/video-positive-start-time.html |
@@ -0,0 +1,30 @@ |
+<!DOCTYPE html> |
+<title>video with a postive start time</title> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<div id="log"></div> |
+<video controls></video> |
+<script> |
+async_test(function(t) { |
+ var video = document.querySelector('video'); |
+ video.src = 'resources/test-positive-start-time.webm'; |
+ |
+ var seekTime = 5; |
+ |
+ // Verify initial start time is correct. |
+ video.onloadeddata = t.step_func(function() { |
+ 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
|
+ assert_equals(video.currentTime, 4.253, 'currentTime'); |
+ 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
|
+ }); |
+ |
+ // Verify the seeked location matches the timestamps in the file. |
+ video.onseeked = t.step_func(function() { |
+ console.log(video.currentTime); |
+ assert_equals(video.currentTime, seekTime, 'currentTime'); |
+ // FIXME: Once Chrome correctly exposes seekable ranges for media with |
+ // positive start times, verify video.seekable.start(0) here. |
+ t.done(); |
+ }) |
+}); |
+</script> |