gecko/content/media/video/test/test_bug448534.html
Chris Pearce dd26dee475 Bug 463830. Use the video file name as the window title for standalone video objects, for now. r+sr=roc,r+sr=bzbarsky
--HG--
extra : rebase_source : b9ee2200c86a0c3fa06cdb163a39a183aa313380
2009-01-16 22:07:26 +13:00

62 lines
1.5 KiB
HTML

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=448534
-->
<head>
<title>Test for Bug 448534</title>
<script type="text/javascript" src="/MochiKit/MochiKit.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>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=448535">Mozilla Bug 448534</a>
<pre id="test">
<script class="testbody" type="text/javascript">
var v;
var played = false;
var completed = false;
function loaded() {
if (completed)
return false;
v = document.getElementById('v');
v.play();
return false;
}
function started() {
if (completed)
return false;
ok(v, "'v' global should be initialized");
ok(!v.paused, "Video should not be paused while playing");
v.parentNode.removeChild(v);
played = true;
return false;
}
function stopped() {
if (completed)
return false;
completed = true;
ok(v, "'v' global should be initialized");
ok(v.paused, "Video should be paused after removing from the Document");
SimpleTest.finish();
return false;
}
SimpleTest.waitForExplicitFinish();
</script>
</pre>
<!-- Ogg video obtained from Theora test suite: http://v2v.cc/~j/theora_testsuite/ -->
<video id='v'
src='320x240.ogv'
onloadedmetadata='return loaded();'
onplay='return started();'
onpause='return stopped();'></video>
</body>
</html>