| Index: third_party/WebKit/LayoutTests/webaudio/offlineaudiodestination.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/offlineaudiodestination.html b/third_party/WebKit/LayoutTests/webaudio/offlineaudiodestination.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..71e8315bfee9345cfe699106e25286be17fbba9f
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/offlineaudiodestination.html
|
| @@ -0,0 +1,62 @@
|
| +<!doctype html>
|
| +<html>
|
| + <head>
|
| + <title>Test OfflineAudioDestination</title>
|
| + <script src="../resources/testharness.js"></script>
|
| + <script src="../resources/testharnessreport.js"></script>
|
| + <script src="resources/audio-testing.js"></script>
|
| + <title>Test Automation of Biquad Filters</title>
|
| + </head>
|
| + <script>
|
| + // Don't need to run these tests at high sampling rate, so just use a low
|
| + // one to reduce memory usage and complexity.
|
| + var sampleRate = 16000;
|
| +
|
| + var audit = Audit.createTaskRunner();
|
| +
|
| + audit.defineTask("test", function (done) {
|
| + // Create offline context with 7 channels. The number of channels is
|
| + // arbitrary here.
|
| + var context = new OfflineAudioContext(7, 1, sampleRate);
|
| +
|
| + var dest = context.destination;
|
| +
|
| + // Verify we have the correct values.
|
| + Should("dest.channelCount", dest.channelCount).beEqualTo(7);
|
| + Should("dest.maxChannelCount", dest.maxChannelCount).beEqualTo(dest.channelCount);
|
| + Should("dest.channelCountMode", dest.channelCountMode).beEqualTo("explicit");
|
| +
|
| +
|
| + // Verify that we can't change the channel count and channel mode
|
| + Should("dest.channelCount = 7", function () {
|
| + dest.channelCount = 7;
|
| + }).notThrow();
|
| +
|
| + Should("dest.channelCount = 3", function () {
|
| + dest.channelCount = 3;
|
| + }).throw("NotSupportedError");
|
| +
|
| + Should('dest.channelCountMode = "explicit"', function () {
|
| + dest.channelCountMode = "explicit";
|
| + }).notThrow();
|
| +
|
| + Should('dest.channelCountMode = "max"', function () {
|
| + dest.channelCountMode = "max";
|
| + }).throw("NotSupportedError");
|
| +
|
| + Should('dest.channelCountMode = "clamped-max"', function () {
|
| + dest.channelCountMode = "clamped-max";
|
| + }).throw("NotSupportedError");
|
| +
|
| + // Verify that we can't change maxChannelCount.
|
| + dest.maxChannelCount = 14;
|
| + Should("dest.maxChannelCount = 14", dest.maxChannelCount)
|
| + .beEqualTo(dest.channelCount);
|
| + done();
|
| + });
|
| +
|
| + audit.runTasks();
|
| + </script>
|
| + <body>
|
| + </body>
|
| +</html>
|
|
|