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">
|
2009-07-09 19:03:02 -07:00
|
|
|
var tmpAudio = new Audio();
|
|
|
|
for (var i = 0; i < gAudioTests.length; ++i) {
|
|
|
|
var test = gAudioTests[i];
|
2009-07-14 07:04:56 -07:00
|
|
|
if (!tmpAudio.canPlayType(test.type))
|
2009-07-09 19:03:02 -07:00
|
|
|
continue;
|
|
|
|
|
|
|
|
var a1 = new Audio(test.name);
|
2009-07-26 14:31:11 -07:00
|
|
|
is(a1.getAttribute("autobuffer"), "autobuffer", "Autobuffer automatically set");
|
2009-10-09 04:48:33 -07:00
|
|
|
is(a1.src.match("/[^/]+$"), "/" + test.name, "src OK");
|
2009-07-09 19:03:02 -07:00
|
|
|
}
|
2009-05-18 22:18:41 -07:00
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|