OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 | |
3 <html> | |
4 <head> | |
5 <script src="../resources/js-test.js"></script> | |
6 <script src="resources/compatibility.js"></script> | |
7 <script src="resources/audit-util.js"></script> | |
8 <script src="resources/audio-testing.js"></script> | |
9 </head> | |
10 | |
11 <body> | |
12 <div id="description"></div> | |
13 <div id="console"></div> | |
14 | |
15 <script> | |
16 description("Basic tests for MediaStreamAudioDestinationNode API."); | |
17 | |
18 var context; | |
19 var mediaStreamDestination; | |
20 | |
21 function runTest() { | |
22 if (window.testRunner) { | |
23 testRunner.dumpAsText(); | |
24 } | |
25 | |
26 context = new AudioContext(); | |
27 | |
28 mediaStreamDestination = context.createMediaStreamDestination(); | |
29 | |
30 // MediaStreamAudioDestinationNode should inherit AudioNode. | |
31 shouldBe('mediaStreamDestination.__proto__.__proto__', 'AudioNode.prototype'
); | |
32 | |
33 // Check the channel count boundary of 8. | |
34 Should('Setting the channel count beyond 8', function () { | |
35 mediaStreamDestination.channelCount = 9; | |
36 }).throw('IndexSizeError'); | |
37 | |
38 // Check number of inputs and outputs. | |
39 if (mediaStreamDestination.numberOfInputs == 1) | |
40 testPassed("Destination AudioNode has one input."); | |
41 else | |
42 testFailed("Destination AudioNode should have one input."); | |
43 | |
44 // FIXME: We should have no outputs, but since we're implemented using Audio
BasicInspectorNode | |
45 // we have one. | |
46 // if (mediaStreamDestination.numberOfOutputs == 0) | |
47 // testPassed("Destination AudioNode has no outputs."); | |
48 // else | |
49 // testFailed("Destination AudioNode should not have outputs."); | |
50 | |
51 // FIXME: add a test where we create a PeerConnection and call addStream(med
iaStreamDestination.stream). | |
52 | |
53 finishJSTest(); | |
54 } | |
55 | |
56 runTest(); | |
57 window.successfullyParsed = true; | |
58 | |
59 </script> | |
60 | |
61 </body> | |
62 </html> | |
OLD | NEW |