| Index: third_party/WebKit/LayoutTests/webaudio/ChannelMerger/audiochannelmerger-input-non-default.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/ChannelMerger/audiochannelmerger-input-non-default.html b/third_party/WebKit/LayoutTests/webaudio/ChannelMerger/audiochannelmerger-input-non-default.html
|
| index efb49add4922daf5b53acaa81796307a6bc8c242..111fa56b9a09b889dab524ff96299e63b01d9f7b 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/ChannelMerger/audiochannelmerger-input-non-default.html
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/ChannelMerger/audiochannelmerger-input-non-default.html
|
| @@ -5,7 +5,7 @@
|
| <script src="../../resources/testharness.js"></script>
|
| <script src="../../resources/testharnessreport.js"></script>
|
| <script src="../resources/audit-util.js"></script>
|
| - <script src="../resources/audio-testing.js"></script>
|
| + <script src="../resources/audit.js"></script>
|
| <script src="../resources/merger-testing.js"></script>
|
| </head>
|
|
|
| @@ -17,8 +17,8 @@
|
|
|
| // Task: Check if an inactive input renders a silent mono channel in the
|
| // output.
|
| - audit.defineTask('silent-channel', function (done) {
|
| - testMergerInput({
|
| + audit.define('silent-channel', (task, should) => {
|
| + testMergerInput(should, {
|
| numberOfChannels: 7,
|
|
|
| // Create a mono source buffer filled with '1'.
|
| @@ -29,14 +29,15 @@
|
|
|
| // 7th channel should be '1'.
|
| expected: [0, 0, 0, 0, 0, 0, 1],
|
| - }, done);
|
| + })
|
| + .then(() => task.done());
|
| });
|
|
|
|
|
| // Task: Check if a stereo input is being down-mixed to mono channel
|
| // correctly based on the mixing rule.
|
| - audit.defineTask('stereo-down-mixing', function (done) {
|
| - testMergerInput({
|
| + audit.define('stereo-down-mixing', (task, should) => {
|
| + testMergerInput(should, {
|
| numberOfChannels: 7,
|
|
|
| // Create a stereo buffer filled with '1' and '2' for left and right
|
| @@ -49,14 +50,15 @@
|
| // The result of summed and down-mixed stereo audio should be 1.5.
|
| // (= 1 * 0.5 + 2 * 0.5)
|
| expected: [0, 0, 0, 0, 0, 0, 1.5],
|
| - }, done);
|
| + })
|
| + .then(() => task.done());
|
| });
|
|
|
|
|
| // Task: Check if 3-channel input gets processed by the 'discrete' mixing
|
| // rule.
|
| - audit.defineTask('undefined-channel-layout', function (done) {
|
| - testMergerInput({
|
| + audit.define('undefined-channel-layout', (task, should) => {
|
| + testMergerInput(should, {
|
| numberOfChannels: 7,
|
|
|
| // Create a 3-channel buffer filled with '1', '2', and '3' respectively.
|
| @@ -69,21 +71,11 @@
|
| // not a canonical layout, so the input channel 2 and 3 should be
|
| // dropped by 'discrete' mixing rule.
|
| expected: [0, 0, 0, 0, 0, 0, 1],
|
| - }, done);
|
| + })
|
| + .then(() => task.done());
|
| });
|
|
|
| - audit.defineTask('finish', function (done) {
|
| - done();
|
| - });
|
| -
|
| - audit.runTasks(
|
| - 'silent-channel',
|
| - 'stereo-down-mixing',
|
| - 'undefined-channel-layout',
|
| - 'finish'
|
| - );
|
| -
|
| - successfullyParsed = true;
|
| + audit.run();
|
| </script>
|
| </body>
|
|
|
|
|