c3fc8a039b06693aaa136831f20d004e823ab5e3
[WebKit-https.git] / LayoutTests / media / video-seekable.html
1 <video controls></video>
2 <script src=video-test.js></script>
3 <script>
4     testExpected("video.seekable.length", 0);
5     testException("video.seekable.start(-1)", "DOMException.INDEX_SIZE_ERR");
6     testException("video.seekable.end(-1)", "DOMException.INDEX_SIZE_ERR");
7     testException("video.seekable.start(0)", "DOMException.INDEX_SIZE_ERR");
8     testException("video.seekable.end(0)", "DOMException.INDEX_SIZE_ERR");
9     waitForEvent('load',
10         function () 
11         {
12             testExpected("video.seekable.length", 1);
13             testExpected("video.seekable.start(0)", 0);
14             testExpected("video.seekable.end(0)",  0, ">");
15             testException("video.seekable.start(-1)", "DOMException.INDEX_SIZE_ERR");
16             testException("video.seekable.end(-1)", "DOMException.INDEX_SIZE_ERR");
17             testException("video.seekable.start(1)", "DOMException.INDEX_SIZE_ERR");
18             testException("video.seekable.end(1)", "DOMException.INDEX_SIZE_ERR");
19             endTest();
20         }
21     );
22     video.src = "content/test.mp4";
23 </script>