| Index: third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-loop-grain-no-duration.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-loop-grain-no-duration.html b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-loop-grain-no-duration.html
|
| index 90ae32a8bfa81c0228e5300d954c9fda625263a7..cb3c90e5ce67cdb66fe5a12879de44e37b5febfb 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-loop-grain-no-duration.html
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-loop-grain-no-duration.html
|
| @@ -6,7 +6,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>
|
| </head>
|
|
|
| <body>
|
| @@ -19,7 +19,7 @@
|
|
|
| // Task: create a short linear ramp and enable looping. The test will
|
| // verify that the ramp was looped the appropriate number of times.
|
| - audit.defineTask('loop-count', function (done) {
|
| + audit.define('loop-count', (task, should) => {
|
| // How many loops of the source we want to render. Any whole number
|
| // greater than 1 will work.
|
| var loopCount = 4;
|
| @@ -52,15 +52,15 @@
|
| expected.set(linearRamp, linearRamp.length * i);
|
|
|
| // The actual output should match the created loop.
|
| - Should('The output of actual and expected loops', actual)
|
| + should(actual, 'The output of actual and expected loops')
|
| .beEqualToArray(expected);
|
| - }).then(done);
|
| + }).then(() => task.done());
|
| });
|
|
|
| // Task: Test that looping an AudioBufferSource works correctly if the
|
| // source is started and the buffer is assigned later, but before the source
|
| // would start.
|
| - audit.defineTask('delayed-start', function (done) {
|
| + audit.define('delayed-start', (task, should) => {
|
| var renderDuration = 2;
|
| var context = new OfflineAudioContext(2, sampleRate * renderDuration, sampleRate);
|
| var linearRampBuffer = createLinearRampBuffer(context, 128);
|
| @@ -89,24 +89,16 @@
|
| });
|
|
|
| context.startRendering().then(function (buffer) {
|
| - // The left and right channel must match regardless of the timing
|
| - // of buffer assignment.
|
| - Should('The content of the left and right channel',
|
| - buffer.getChannelData(0)).beEqualToArray(buffer.getChannelData(1));
|
| - }).then(done);
|
| + // The left and right channel must match regardless of the timing
|
| + // of buffer assignment.
|
| + should(buffer.getChannelData(0),
|
| + 'The content of the left and right channel')
|
| + .beEqualToArray(buffer.getChannelData(1));
|
| + })
|
| + .then(() => task.done());
|
| });
|
|
|
| - audit.defineTask('finish', function (done) {
|
| - done();
|
| - });
|
| -
|
| - audit.runTasks(
|
| - 'loop-count',
|
| - 'delayed-start',
|
| - 'finish'
|
| - );
|
| -
|
| - successfullyParsed = true;
|
| + audit.run();
|
| </script>
|
| </body>
|
|
|
|
|