Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / webaudio / mediastreamaudiodestinationnode.html
blob6822fba9e619b1383ac4cd3b5bec229e3a85488a
1 <!DOCTYPE html>
3 <html>
4 <head>
5 <script src="../resources/js-test.js"></script>
6 <script src="resources/compatibility.js"></script>
7 <script src="resources/audio-testing.js"></script>
8 </head>
10 <body>
11 <div id="description"></div>
12 <div id="console"></div>
14 <script>
15 description("Basic tests for MediaStreamAudioDestinationNode API.");
17 var context;
18 var mediaStreamDestination;
20 function runTest() {
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.");
35 else
36 testFailed("Destination AudioNode should have one input.");
38 // FIXME: We should have no outputs, but since we're implemented using AudioBasicInspectorNode
39 // we have one.
40 // if (mediaStreamDestination.numberOfOutputs == 0)
41 // testPassed("Destination AudioNode has no outputs.");
42 // else
43 // testFailed("Destination AudioNode should not have outputs.");
45 // FIXME: add a test where we create a PeerConnection and call addStream(mediaStreamDestination.stream).
47 finishJSTest();
50 runTest();
51 window.successfullyParsed = true;
53 </script>
55 </body>
56 </html>