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