mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
46 lines
1.1 KiB
HTML
46 lines
1.1 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Media test: timeupdate and size</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 if the media size during the first timeupdate is correct.
|
|
var completed = false;
|
|
|
|
function startTest() {
|
|
if (completed)
|
|
return false;
|
|
|
|
var v = document.getElementById('v');
|
|
v.play();
|
|
return false;
|
|
}
|
|
|
|
function timeUpdated() {
|
|
if (completed)
|
|
return false;
|
|
|
|
var v = document.getElementById('v');
|
|
ok(v.videoHeight == 240, "Check video height of " + v.videoHeight + " is 240");
|
|
ok(v.videoWidth == 320, "Check video width of " + v.videoWidth + " is 320");
|
|
completed = true;
|
|
v.pause();
|
|
SimpleTest.finish();
|
|
return false;
|
|
}
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
</script>
|
|
</pre>
|
|
<video id='v'
|
|
src='seek.ogv'
|
|
onloadedmetadata='return startTest();'
|
|
ontimeupdate='return timeUpdated();'></video>
|
|
</body>
|
|
</html>
|