2009-02-26 03:55:30 -08:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Media test: paused</title>
|
2009-05-06 13:46:04 -07:00
|
|
|
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
2009-02-26 03:55:30 -08:00
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<pre id="test">
|
|
|
|
<script class="testbody" type="text/javascript">
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
|
|
|
|
var a = document.createElement('audio');
|
|
|
|
a.src = 'r11025_u8_c1.wav';
|
|
|
|
a.load();
|
|
|
|
is(a.paused, true, "Must be paused at start");
|
|
|
|
a.play();
|
|
|
|
is(a.paused, false, "Must not be paused after play");
|
|
|
|
|
|
|
|
a.addEventListener("ended", function () {
|
|
|
|
is(a.paused, false, "Must not be paused after end");
|
|
|
|
SimpleTest.finish();
|
|
|
|
}, false);
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|