4 <title>Media test: timeupdate during playback
</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 ontimeupdate='return timeUpdated();'
></video>
16 <script class=
"testbody" type=
"text/javascript">
17 // Test if timeupdate is dispatched and the current time during the
18 // update is increasing.
20 var completed = false;
22 function startTest() {
26 var v = document.getElementById('v');
31 function timeUpdated() {
35 var v = document.getElementById('v');
36 ok(v.currentTime
> lastTime,
37 "Check currentTime of " +
39 " is greater than last time of " +
41 lastTime = v.currentTime;
45 function playbackEnded() {
54 SimpleTest.waitForExplicitFinish();