<!DOCTYPE html>
<title>Test video "seekable" properties.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<video></video>
<script>
async_test(function(t) {
var video = document.querySelector("video");
assert_equals(video.seekable.length, 0);
assert_throws_dom("IndexSizeError", function() { video.seekable.start(-1); });
assert_throws_dom("IndexSizeError", function() { video.seekable.end(-1); });
assert_throws_dom("IndexSizeError", function() { video.seekable.start(0); });
assert_throws_dom("IndexSizeError", function() { video.seekable.end(0); });
video.onloadedmetadata = t.step_func_done(function () {
assert_equals(video.seekable.length, 1);
assert_equals(video.seekable.start(0), 0);
assert_greater_than(video.seekable.end(0), 5);
assert_less_than(video.seekable.end(0), 7);
assert_throws_dom("IndexSizeError", function() { video.seekable.start(-1); });
assert_throws_dom("IndexSizeError", function() { video.seekable.end(-1); });
assert_throws_dom("IndexSizeError", function() { video.seekable.start(1); });
assert_throws_dom("IndexSizeError", function() { video.seekable.end(1); });
});
video.src = "content/test.ogv";
});
</script>