2009-05-19 09:18:41 +04:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
2009-10-09 15:48:33 +04:00
|
|
|
<title>Media test: Audio Constructor Test 2</title>
|
2009-05-19 09:18:41 +04: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-10 06:03:02 +04:00
|
|
|
<script type="text/javascript" src="manifest.js"></script>
|
2009-05-19 09:18:41 +04:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<pre id="test">
|
|
|
|
<script class="testbody" type="text/javascript">
|
2009-07-10 06:03:02 +04:00
|
|
|
var tmpAudio = new Audio();
|
|
|
|
for (var i = 0; i < gAudioTests.length; ++i) {
|
|
|
|
var test = gAudioTests[i];
|
2009-07-14 18:04:56 +04:00
|
|
|
if (!tmpAudio.canPlayType(test.type))
|
2009-07-10 06:03:02 +04:00
|
|
|
continue;
|
|
|
|
|
|
|
|
var a1 = new Audio(test.name);
|
2010-08-18 05:50:49 +04:00
|
|
|
is(a1.getAttribute("autobuffer"), "autobuffer", "Autobuffer automatically set");
|
2009-10-09 15:48:33 +04:00
|
|
|
is(a1.src.match("/[^/]+$"), "/" + test.name, "src OK");
|
2009-07-10 06:03:02 +04:00
|
|
|
}
|
2009-05-19 09:18:41 +04:00
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|