Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / content / media / video / test / test_seek7.html
bloba09727bada39a077bee6197cb875f82d81334a3f
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Media test: seek test 7</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 onseeked='return seekEnded();'></video>
14 <pre id="test">
15 <script class="testbody" type="text/javascript">
16 // Test for bug identified by Chris Pearce in comment 40 on
17 // bug 449159.
18 var v = document.getElementById('v');
19 var seekCount = 0;
20 var completed = false;
21 var interval;
23 function startTest() {
24 if (completed)
25 return false;
27 interval = setInterval(function() { v.currentTime=Math.random()*3; }, 10);
28 return false;
31 function seekEnded() {
32 if (completed)
33 return false;
35 seekCount++;
36 ok(true, "Seek " + seekCount);
37 if (seekCount == 3) {
38 clearInterval(interval);
39 completed = true;
40 SimpleTest.finish();
42 return false;
45 SimpleTest.waitForExplicitFinish();
46 </script>
47 </pre>
48 </body>
49 </html>