Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: timelapse
Fetching contributors…

Cannot retrieve contributors at this time

69 lines (53 sloc) 1.801 kB
<!DOCTYPE html>
<html>
<head>
<script src="../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 AudioChannelMerger.");
function runTest() {
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
window.jsTestIsAsync = true;
var context = new webkitAudioContext();
try {
var mergernode = context.createChannelMerger(0);
testFailed("Exception should be thrown for numberOfInputs <= 0.");
} catch(e) {
testPassed("Exception was thrown for numberOfInputs <= 0.");
}
try {
var mergernode = context.createChannelMerger(33);
testFailed("Exception should be thrown for numberOfInputs >= 32.");
} catch(e) {
testPassed("Exception was thrown for numberOfInputs >= 32.");
}
try {
var mergernode = context.createChannelMerger(32);
testPassed("AudioChannelMerger created successfully with numberOfInputs = 32.");
} catch(e) {
testFailed("Failed to create AudioChannelMerger with numberOfInputs = 32.");
}
try {
var mergernode = context.createChannelMerger();
testPassed("AudioChannelMerger created successfully with empty parameter.");
if (mergernode.toString().indexOf("ChannelMergerNode") > -1)
testPassed("ChannelMergerNode Object is available.");
else
testFailed("ChannelMergerNode Object is not available.");
} catch(e) {
testFailed("Failed to create AudioChannelMerger with empty parameter.");
}
finishJSTest();
}
runTest();
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.