4 <title>Media test: seek test
5</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 for a seek, followed by another seek before the first is complete.
18 var startPassed = false;
19 var seek1Passed = false;
20 var seek2Passed = false;
22 var completed = false;
24 function startTest() {
28 var v = document.getElementById('v');
33 function seekStarted() {
38 var v = document.getElementById('v');
43 function seekEnded() {
46 var v = document.getElementById('v');
49 if (v.currentTime
>=
2 && v.currentTime <=
2.2)
54 if (v.currentTime
>=
1 && v.currentTime <=
1.2)
57 ok(seek1Passed,
"First seek");
58 ok(seek2Passed,
"Second seek");
66 SimpleTest.waitForExplicitFinish();