4 <title>Media test: timeupdate and size
</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 startSeek();'
14 ontimeupdate='return timeUpdated();'
></video>
16 <script class=
"testbody" type=
"text/javascript">
17 // Test if the media size during the first timeupdate is correct.
18 var completed = false;
21 function startTest() {
25 var v = document.getElementById('v');
30 function startSeek() {
38 function timeUpdated() {
39 if (completed || !seeking)
42 var v = document.getElementById('v');
43 ok(v.currentTime
>=
1.8 && v.currentTime <=
2.2,
44 "Check currentTime of " + v.currentTime +
" is within range in timeupdate after seek");
51 SimpleTest.waitForExplicitFinish();