blob: fbf15506de53d2cf8776bd06a457a9e02edd1620 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/audio-testing.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script>
description("Basic tests for MediaStreamAudioDestinationNode API.");
var context;
var mediaStreamDestination;
function runTest() {
if (window.testRunner) {
testRunner.dumpAsText();
}
context = new webkitAudioContext();
mediaStreamDestination = context.createMediaStreamDestination();
// MediaStreamAudioDestinationNode should inherit AudioNode.
shouldBe('mediaStreamDestination.__proto__.__proto__', 'AudioNode.prototype');
// Check number of inputs and outputs.
if (mediaStreamDestination.numberOfInputs == 1)
testPassed("Destination AudioNode has one input.");
else
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(mediaStreamDestination.stream).
finishJSTest();
}
runTest();
window.successfullyParsed = true;
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
</body>
</html>