4 <title>Media test: seek test
4</title>
5 <script type=
"text/javascript" src=
"/MochiKit/MochiKit.js"></script>
6 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
12 onloadedmetadata='return startTest();'
13 onseeking='return seekStarted();'
14 onseeked='return seekEnded();'
></video>
16 <script class=
"testbody" type=
"text/javascript">
17 // Test seeking works if current time is set but video is not played.
18 var startPassed = false;
19 var completed = false;
21 function startTest() {
25 var v = document.getElementById('v');
30 function seekStarted() {
38 function seekEnded() {
42 var t = document.getElementById('v').currentTime;
43 ok(t
>=
2 && t<=
3,
"Video currentTime should be around 2: " + t);
49 SimpleTest.waitForExplicitFinish();