4 <title>Wave 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" />
11 onloadedmetadata='return startTest();'
12 onseeking='return seekStarted();'
13 onseeked='return seekEnded();'
>
14 <source type='audio/x-wav' src='r11025_s16_c1.wav'
>
17 <script class=
"testbody" type=
"text/javascript">
18 // Test for a seek, followed by another seek before the first is complete.
19 var startPassed = false;
20 var seek1Passed = false;
21 var seek2Passed = false;
23 var completed = false;
25 function startTest() {
29 var v = document.getElementById('v');
34 function seekStarted() {
39 var v = document.getElementById('v');
44 function seekEnded() {
47 var v = document.getElementById('v');
50 if (v.currentTime
>=
0.7 && v.currentTime <=
0.9)
55 if (v.currentTime
>=
0.4 && v.currentTime <=
0.6)
58 ok(seek1Passed,
"First seek");
59 ok(seek2Passed,
"Second seek");
67 SimpleTest.waitForExplicitFinish();