2009-05-18 22:18:41 -07:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
2009-10-09 04:48:33 -07:00
|
|
|
<title>Media test: Audio Constructor Test 2</title>
|
2009-05-18 22:18:41 -07:00
|
|
|
<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" />
|
2009-07-09 19:03:02 -07:00
|
|
|
<script type="text/javascript" src="manifest.js"></script>
|
2009-05-18 22:18:41 -07:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<pre id="test">
|
|
|
|
<script class="testbody" type="text/javascript">
|
2010-08-26 19:11:46 -07:00
|
|
|
|
2009-07-09 19:03:02 -07:00
|
|
|
var tmpAudio = new Audio();
|
2010-08-26 19:11:46 -07:00
|
|
|
|
|
|
|
var manager = new MediaTestManager;
|
|
|
|
|
|
|
|
function startTest(test, token) {
|
2009-07-14 07:04:56 -07:00
|
|
|
if (!tmpAudio.canPlayType(test.type))
|
2010-09-14 16:24:47 -07:00
|
|
|
return;
|
2010-08-26 19:11:46 -07:00
|
|
|
manager.started(token);
|
2009-07-09 19:03:02 -07:00
|
|
|
var a1 = new Audio(test.name);
|
2010-08-19 15:50:37 -07:00
|
|
|
is(a1.getAttribute("preload"), "auto", "Preload automatically set to auto");
|
2015-04-14 06:28:13 -07:00
|
|
|
ok(a1.src.endsWith("/" + test.name), "src OK");
|
2010-08-26 19:11:46 -07:00
|
|
|
manager.finished(token);
|
2009-07-09 19:03:02 -07:00
|
|
|
}
|
2010-08-26 19:11:46 -07:00
|
|
|
|
|
|
|
manager.runTests(gAudioTests, startTest);
|
|
|
|
|
2009-05-18 22:18:41 -07:00
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|