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 ontimeupdate='return timeUpdated();'
></video>
15 <script class=
"testbody" type=
"text/javascript">
16 // Test if the media size during the first timeupdate is correct.
17 var completed = false;
19 function startTest() {
23 var v = document.getElementById('v');
28 function timeUpdated() {
32 var v = document.getElementById('v');
33 ok(v.videoHeight ==
240,
"Check video height of " + v.videoHeight +
" is 240");
34 ok(v.videoWidth ==
320,
"Check video width of " + v.videoWidth +
" is 320");
41 SimpleTest.waitForExplicitFinish();