5 <script src=
"../resources/js-test.js"></script>
6 <script src=
"resources/compatibility.js"></script>
7 <script src=
"resources/audio-testing.js"></script>
11 <div id=
"description"></div>
12 <div id=
"console"></div>
15 description("Basic tests for MediaStreamAudioDestinationNode API.");
18 var mediaStreamDestination
;
21 if (window
.testRunner
) {
22 testRunner
.dumpAsText();
25 context
= new AudioContext();
27 mediaStreamDestination
= context
.createMediaStreamDestination();
29 // MediaStreamAudioDestinationNode should inherit AudioNode.
30 shouldBe('mediaStreamDestination.__proto__.__proto__', 'AudioNode.prototype');
32 // Check number of inputs and outputs.
33 if (mediaStreamDestination
.numberOfInputs
== 1)
34 testPassed("Destination AudioNode has one input.");
36 testFailed("Destination AudioNode should have one input.");
38 // FIXME: We should have no outputs, but since we're implemented using AudioBasicInspectorNode
40 // if (mediaStreamDestination.numberOfOutputs == 0)
41 // testPassed("Destination AudioNode has no outputs.");
43 // testFailed("Destination AudioNode should not have outputs.");
45 // FIXME: add a test where we create a PeerConnection and call addStream(mediaStreamDestination.stream).
51 window
.successfullyParsed
= true;