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) {
|
2014-02-09 18:27:47 -08:00
|
|
|
if (!player.canPlayType(test.type)) {
|
2010-08-26 19:11:46 -07:00
|
|
|
return;
|
2014-02-09 18:27:47 -08:00
|
|
|
}
|
2010-08-26 19:11:46 -07:00
|
|
|
manager.started(token);
|
2010-03-17 20:00:18 -07:00
|
|
|
var a = new Audio(test.name);
|
2014-03-18 23:07:41 -07:00
|
|
|
a.autoplay = true;
|
2010-03-17 20:00:18 -07:00
|
|
|
a.addEventListener("ended",
|
|
|
|
function(e){
|
2014-03-18 23:07:41 -07:00
|
|
|
ok(true, "[" + a.src + "]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>
|