mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
dd26dee475
--HG-- extra : rebase_source : b9ee2200c86a0c3fa06cdb163a39a183aa313380
50 lines
1.1 KiB
HTML
50 lines
1.1 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Media test: seek test 7</title>
|
|
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
</head>
|
|
<body>
|
|
<pre id="test">
|
|
<script class="testbody" type="text/javascript">
|
|
// Test for bug identified by Chris Pearce in comment 40 on
|
|
// bug 449159.
|
|
var v;
|
|
var seekCount = 0;
|
|
var completed = false;
|
|
var interval;
|
|
|
|
function startTest() {
|
|
if (completed)
|
|
return false;
|
|
v = document.getElementById('v');
|
|
interval = setInterval(function() { v.currentTime=Math.random()*3; }, 10);
|
|
return false;
|
|
}
|
|
|
|
function seekEnded() {
|
|
if (completed)
|
|
return false;
|
|
|
|
seekCount++;
|
|
ok(true, "Seek " + seekCount);
|
|
if (seekCount == 3) {
|
|
clearInterval(interval);
|
|
completed = true;
|
|
SimpleTest.finish();
|
|
}
|
|
return false;
|
|
}
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
</script>
|
|
</pre>
|
|
<video id='v'
|
|
src='seek.ogv'
|
|
onloadedmetadata='return startTest();'
|
|
onseeked='return seekEnded();'></video>
|
|
</body>
|
|
</html>
|