Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Test the AudioContext.destination interface</title>
5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
6 <script type="text/javascript" src="webaudio.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
8 </head>
9 <body>
10 <pre id="test">
11 <script class="testbody" type="text/javascript">
13 // Work around bug 911777
14 SpecialPowers.forceGC();
15 SpecialPowers.forceCC();
17 SimpleTest.waitForExplicitFinish();
18 addLoadEvent(function() {
19 var ac = new AudioContext();
20 ok(ac.destination.maxChannelCount > 0, "We can query the maximum number of channels");
22 var oac = new OfflineAudioContext(2, 1024, 48000);
23 ok(oac.destination.maxChannelCount, 2, "This OfflineAudioContext should have 2 max channels.");
25 oac = new OfflineAudioContext(6, 1024, 48000);
26 ok(oac.destination.maxChannelCount, 6, "This OfflineAudioContext should have 6 max channels.");
28 expectException(function() {
29 oac.destination.channelCount = oac.destination.channelCount + 1;
30 }, DOMException.INDEX_SIZE_ERR);
32 SimpleTest.finish();
33 });
35 </script>
36 </pre>
37 </body>
38 </html>