blob: 26f8e6af8d8dc1b42742318d3b85a59e1c5a470d [file] [log] [blame]
<!DOCTYPE html>
<script src="../resources/js-test.js"></script>
<script src="resources/compatibility.js"></script>
<script src="resources/audio-testing.js"></script>
<div id="description"></div>
<div id="console"></div>
description("Basic tests for MediaStreamAudioDestinationNode API.");
var context;
var mediaStreamDestination;
function runTest() {
if (window.testRunner) {
context = new AudioContext();
mediaStreamDestination = context.createMediaStreamDestination();
// MediaStreamAudioDestinationNode should inherit AudioNode.
shouldBe('mediaStreamDestination.__proto__.__proto__', 'AudioNode.prototype');
// Check the channel count boundary of 8.
Should('Setting the channel count beyond 8', function () {
mediaStreamDestination.channelCount = 9;
// Check number of inputs and outputs.
if (mediaStreamDestination.numberOfInputs == 1)
testPassed("Destination AudioNode has one input.");
testFailed("Destination AudioNode should have one input.");
// FIXME: We should have no outputs, but since we're implemented using AudioBasicInspectorNode
// we have one.
// if (mediaStreamDestination.numberOfOutputs == 0)
// testPassed("Destination AudioNode has no outputs.");
// else
// testFailed("Destination AudioNode should not have outputs.");
// FIXME: add a test where we create a PeerConnection and call addStream(
window.successfullyParsed = true;