2008-08-03 18:51:01 -07:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=448534
|
|
|
|
-->
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<title>Test for Bug 448534</title>
|
2009-05-06 13:46:04 -07:00
|
|
|
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
2008-08-03 18:51:01 -07:00
|
|
|
<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">
|
2009-01-05 17:18:40 -08:00
|
|
|
var v;
|
2008-08-03 18:51:01 -07:00
|
|
|
var played = false;
|
2008-10-19 00:39:21 -07:00
|
|
|
var completed = false;
|
|
|
|
|
|
|
|
function loaded() {
|
|
|
|
if (completed)
|
|
|
|
return false;
|
|
|
|
|
2009-01-05 17:18:40 -08:00
|
|
|
v = document.getElementById('v');
|
2008-10-19 00:39:21 -07:00
|
|
|
v.play();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2008-08-03 18:51:01 -07:00
|
|
|
function started() {
|
2008-10-19 00:39:21 -07:00
|
|
|
if (completed)
|
|
|
|
return false;
|
2009-01-05 17:18:40 -08:00
|
|
|
ok(v, "'v' global should be initialized");
|
2008-08-03 18:51:01 -07:00
|
|
|
ok(!v.paused, "Video should not be paused while playing");
|
|
|
|
v.parentNode.removeChild(v);
|
|
|
|
played = true;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
function stopped() {
|
2008-10-19 00:39:21 -07:00
|
|
|
if (completed)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
completed = true;
|
2009-01-05 17:18:40 -08:00
|
|
|
ok(v, "'v' global should be initialized");
|
2008-08-03 18:51:01 -07:00
|
|
|
ok(v.paused, "Video should be paused after removing from the Document");
|
2008-10-19 00:39:21 -07:00
|
|
|
SimpleTest.finish();
|
2008-08-03 18:51:01 -07:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
</script>
|
|
|
|
</pre>
|
2009-01-05 17:18:40 -08:00
|
|
|
<!-- Ogg video obtained from Theora test suite: http://v2v.cc/~j/theora_testsuite/ -->
|
|
|
|
<video id='v'
|
2009-01-16 01:07:26 -08:00
|
|
|
src='320x240.ogv'
|
2009-01-05 17:18:40 -08:00
|
|
|
onloadedmetadata='return loaded();'
|
|
|
|
onplay='return started();'
|
|
|
|
onpause='return stopped();'></video>
|
2008-08-03 18:51:01 -07:00
|
|
|
</body>
|
|
|
|
</html>
|