Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / content / media / video / test / test_timeupdate2.html
blobfd64efe9ee5aafaf251afb04c36ff4c5e0c30d94
1 <!DOCTYPE HTML>
2 <html>
3 <head>
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" />
8 </head>
9 <body>
10 <video id='v'
11 src='seek.ogg'
12 onloadedmetadata='return startTest();'
13 ontimeupdate='return timeUpdated();'></video>
14 <pre id="test">
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() {
20 if (completed)
21 return false;
23 var v = document.getElementById('v');
24 v.play();
25 return false;
28 function timeUpdated() {
29 if (completed)
30 return false;
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");
35 completed = true;
36 v.pause();
37 SimpleTest.finish();
38 return false;
41 SimpleTest.waitForExplicitFinish();
42 </script>
43 </pre>
44 </body>
45 </html>