4 <title>Media test: seek test
6</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 onended='return playbackEnded();'
14 onseeking='return seekStarted();'
15 onseeked='return seekEnded();'
></video>
17 <script class=
"testbody" type=
"text/javascript">
18 // Test for a seek, followed by a play before the seek completes, ensure we play at the end of the seek.
19 var startPassed = false;
20 var endPassed = false;
21 var completed = false;
24 function startTest() {
28 var v = document.getElementById('v');
33 function seekStarted() {
37 var v = document.getElementById('v');
42 function seekEnded() {
49 function playbackEnded() {
52 ok(startPassed,
"Got seeking event");
53 ok(endPassed,
"Got seeked event");
59 SimpleTest.waitForExplicitFinish();