gecko/content/media/video/test/test_videoDocumentTitle.html

55 lines
1.2 KiB
HTML
Raw Normal View History

2009-01-17 01:26:55 -08:00
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=463830
-->
<head>
<title>Test for Bug 463830</title>
<script type="application/javascript" src="/MochiKit/MochiKit.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=463830">Mozilla Bug 463830</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 463830 **/
var gTests = [
{ file: "320x240.ogv", title: "320x240.ogv" },
{ file: "bug461281.ogg", title: "bug461281.ogg" },
];
var gTestNum = 0;
addLoadEvent(runTest);
function runTest() {
if (gTestNum == gTests.length) {
SimpleTest.finish();
return;
}
var file = gTests[gTestNum].file;
var title = gTests[gTestNum].title;
var w = window.open(file, "", "width=500,height=300");
w.onload =
function() {
is(w.document.title, title, "Video doc title incorrect");
w.close();
setTimeout(runTest, 0);
};
gTestNum++;
}
SimpleTest.waitForExplicitFinish();
</script>
</pre>
</body>
</html>