Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / content / media / video / test / test_duration1.html
bloba78449c167a5c9231a0d4d7b0f594ff926b2c4c6
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Media test: seek test 1</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();'></video>
13 <pre id="test">
14 <script class="testbody" type="text/javascript">
15 // Test that getting the duration from a file works
16 var completed = false;
17 var timeout;
19 function startTest() {
20 if (completed)
21 return false;
22 var v = document.getElementById('v');
23 ok(Math.round(v.duration*1000) == 3833, "Check duration of video: " + v.duration);
24 completed = true;
25 clearTimeout(timeout);
26 SimpleTest.finish();
27 return false;
30 timeout = setTimeout(function () {
31 ok(false, "Test timed out");
32 SimpleTest.finish();
33 }, 60000);
35 SimpleTest.waitForExplicitFinish();
36 </script>
37 </pre>
38 </body>
39 </html>