Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-playbackrate-modulation.html |
| diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-playbackrate-modulation.html b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-playbackrate-modulation.html |
| index 89d3e3c9b1babe5a381e4a9bc6be4b215b35218a..45e1f2906a2e39fc8dd6b9ddca87e101feb370e3 100644 |
| --- a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-playbackrate-modulation.html |
| +++ b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-playbackrate-modulation.html |
| @@ -55,49 +55,17 @@ |
| thresholdDiffCount: 0, |
| bitDepth: 16 |
| }); |
| - |
| + if (!window.testRunner) { |
| + // Always save the generated results if we're running in a browser. |
| + var filename = 'audiobuffersource-playbackrate-modulation-actual.wav'; |
| + downloadAudioBuffer(renderedBuffer, filename); |
| + Should("Saved", true) |
| + .summarize(filename, ""); |
| + } |
|
hongchan
2017/03/03 18:39:25
This section can be abstracted a function:
bool g
Raymond Toy
2017/03/03 18:43:10
Yes and no. For old Audit, Should is just a funct
|
| }).then(done); |
| }); |
| - // Task: Create a new reference audio file. See .runTasks() below to run |
| - // this task. |
| - audit.defineTask('generate-reference', function (done) { |
| - if (!window.testRunner) { |
| - done(); |
| - return; |
| - } |
| - |
| - // With this setting, the playback rate will be changing continuously and |
| - // repeatedly within the range of [0, 200] around 100Hz, based on the |
| - // input from the oscillator. |
| - createSawtoothWithModulation(context, 'playbackRate', 100, 100); |
| - |
| - // |finishAudioTest| will automatically create a reference audio file from |
| - // the OAC rendering if the reference file does not exist. |
| - context.oncomplete = finishAudioTest; |
| - context.startRendering(); |
| - testRunner.waitUntilDone(); |
| - |
| - done(); |
| - }); |
| - |
| - audit.defineTask('finish', function (done) { |
| - done(); |
| - }); |
| - |
| - window.onload = function () { |
| - audit.runTasks( |
| - 'load-reference', |
| - 'generate-verify', |
| - 'finish' |
| - ); |
| - }; |
| - |
| - // Use this task to generate a new reference audio file. Make sure to |
| - // comment out .runTasks() above before use this. |
| - // audit.runTasks('generate-reference'); |
| - |
| - successfullyParsed = true; |
| + audit.runTasks(); |
| </script> |
| </body> |