Backed out changeset ddccd40117a0 (bug 1853271) for causing bug 1854769. CLOSED TREE
[gecko.git] / dom / media / test / test_audio2.html
blobfde9adc79173238b2ba7883b9df17d0dd3029c83
1 <!DOCTYPE HTML>
2 <html>
3 <head>
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>
9 </head>
10 <body>
11 <pre id="test">
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))
20 return;
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);
30 </script>
31 </pre>
32 </body>
33 </html>