4 <title>Media test: Audio Constructor Test
2</title>
5 <script type=
"text/javascript" src=
"/MochiKit/MochiKit.js"></script>
6 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
8 <script type=
"text/javascript" src=
"manifest.js"></script>
12 <script class=
"testbody" type=
"text/javascript">
14 var tmpAudio = new Audio();
16 var manager = new MediaTestManager;
18 function startTest(test, token) {
19 if (!tmpAudio.canPlayType(test.type))
21 manager.started(token);
22 var a1 = new Audio(test.name);
23 is(a1.getAttribute(
"preload"),
"auto",
"Preload automatically set to auto");
24 ok(a1.src.endsWith(
"/" + test.name),
"src OK");
25 manager.finished(token);
28 manager.runTests(gAudioTests, startTest);