gecko/content/media/test/test_standalone.html

30 lines
887 B
HTML
Raw Normal View History

<!DOCTYPE HTML>
<html>
<head>
<title>Media test: standalone video documents</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 onload="doTest()">
<iframe id="i" src="320x240.ogv"></iframe>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
function doTest()
{
var elem = document.getElementById("i").contentDocument.body.firstChild;
is(elem.tagName.toLowerCase(), "video", "Is video element");
is(elem.currentSrc.substring(elem.currentSrc.length - 11), "320x240.ogv", "currentSrc");
is(elem.controls, true, "Controls set");
is(elem.autoplay, true, "Autoplay set");
SimpleTest.finish();
}
</script>
</pre>
</body>
</html>