2010-03-17 20:00:18 -07:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=528566
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Test for Bug 528566</title>
|
|
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
|
|
<script type="text/javascript" src="manifest.js"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=528566">Mozilla Bug 528566</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script type="application/javascript">
|
|
|
|
|
|
|
|
/** Test for Bug 528566 **/
|
|
|
|
|
2010-08-26 19:11:46 -07:00
|
|
|
var manager = new MediaTestManager;
|
2010-03-17 20:00:18 -07:00
|
|
|
|
|
|
|
var player = new Audio();
|
|
|
|
|
2010-08-26 19:11:46 -07:00
|
|
|
function startTest(test, token) {
|
2010-03-17 20:00:18 -07:00
|
|
|
if (!player.canPlayType(test.type))
|
2010-08-26 19:11:46 -07:00
|
|
|
return;
|
|
|
|
manager.started(token);
|
2010-03-17 20:00:18 -07:00
|
|
|
var a = new Audio(test.name);
|
|
|
|
a.setAttribute("autoplay", false);
|
|
|
|
a.addEventListener("canplaythrough",
|
|
|
|
function(e){ e.target.play(); },
|
|
|
|
false);
|
|
|
|
a.addEventListener("ended",
|
|
|
|
function(e){
|
|
|
|
ok(true, "We should get to the end. Oh look we did.");
|
2010-08-26 19:11:46 -07:00
|
|
|
manager.finished(token);
|
2010-03-17 20:00:18 -07:00
|
|
|
},
|
|
|
|
false);
|
|
|
|
}
|
|
|
|
|
2010-08-26 19:11:46 -07:00
|
|
|
manager.runTests(gAudioTests, startTest);
|
2010-03-17 20:00:18 -07:00
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|