mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
80 lines
2.4 KiB
HTML
80 lines
2.4 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Media test: seek tests</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" />
|
|
<script type="text/javascript" src="manifest.js"></script>
|
|
<script type="text/javascript" src="seek1.js"></script>
|
|
<script type="text/javascript" src="seek2.js"></script>
|
|
<script type="text/javascript" src="seek3.js"></script>
|
|
<script type="text/javascript" src="seek4.js"></script>
|
|
<script type="text/javascript" src="seek5.js"></script>
|
|
<script type="text/javascript" src="seek6.js"></script>
|
|
<script type="text/javascript" src="seek7.js"></script>
|
|
<script type="text/javascript" src="seek8.js"></script>
|
|
<script type="text/javascript" src="seek9.js"></script>
|
|
<script type="text/javascript" src="seek10.js"></script>
|
|
<script type="text/javascript" src="seek11.js"></script>
|
|
</head>
|
|
<body>
|
|
<pre id="test">
|
|
<script class="testbody" type="text/javascript">
|
|
|
|
var manager = new MediaTestManager;
|
|
|
|
const NUM_SEEK_TESTS = 11
|
|
|
|
function createTestArray() {
|
|
var tests = [];
|
|
var tmpVid = document.createElement("video");
|
|
|
|
for (var testNum=0; testNum<gSeekTests.length; testNum++) {
|
|
var test = gSeekTests[testNum];
|
|
if (!tmpVid.canPlayType(test.type)) {
|
|
continue;
|
|
}
|
|
|
|
for (var i = 1; i <= NUM_SEEK_TESTS; ++i) {
|
|
var t = new Object;
|
|
t.name = test.name;
|
|
t.type = test.type;
|
|
t.duration = test.duration;
|
|
t.number = i;
|
|
tests.push(t);
|
|
}
|
|
}
|
|
return tests;
|
|
}
|
|
|
|
function startTest(test, token) {
|
|
var v = document.createElement('video');
|
|
manager.started(token);
|
|
v.src = test.name;
|
|
v.token = token;
|
|
document.body.appendChild(v);
|
|
var name = test.name + " seek test " + test.number;
|
|
var localIs = function(name) { return function(a, b, msg) {
|
|
is(a, b, name + ": " + msg);
|
|
}}(name);
|
|
var localOk = function(name) { return function(a, msg) {
|
|
ok(a, name + ": " + msg);
|
|
}}(name);
|
|
var localFinish = function(v, manager) { return function() {
|
|
if (v.parentNode) {
|
|
v.parentNode.removeChild(v);
|
|
}
|
|
manager.finished(v.token);
|
|
}}(v, manager);
|
|
dump("Seek test: " + test.number + "\n");
|
|
window['test_seek' + test.number](v, test.duration/2, localIs, localOk, localFinish);
|
|
}
|
|
|
|
manager.runTests(createTestArray(), startTest);
|
|
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|