mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
40 lines
1018 B
HTML
40 lines
1018 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Media test: seek test 1</title>
|
|
<script type="text/javascript" src="/MochiKit/packed.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 that getting the duration from a file works
|
|
var completed = false;
|
|
var timeout;
|
|
|
|
function startTest() {
|
|
if (completed)
|
|
return false;
|
|
var v = document.getElementById('v');
|
|
is(Math.round(v.duration*1000), 3999, "Check duration of video: " + v.duration);
|
|
completed = true;
|
|
clearTimeout(timeout);
|
|
SimpleTest.finish();
|
|
return false;
|
|
}
|
|
|
|
timeout = setTimeout(function () {
|
|
ok(false, "Test timed out");
|
|
SimpleTest.finish();
|
|
}, 60000);
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
</script>
|
|
</pre>
|
|
<video id='v'
|
|
src='seek.ogv'
|
|
onloadedmetadata='return startTest();'></video>
|
|
</body>
|
|
</html>
|