| Index: third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono.html b/third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono.html
|
| index 337769a1b2fd301effe30b9441f2be4dd94497ee..724c6bfb14ebba1e8b4fc1c9ce789e634d784a92 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono.html
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono.html
|
| @@ -2,19 +2,18 @@
|
|
|
| <html>
|
| <head>
|
| -<script src="../../resources/js-test.js"></script>
|
| +<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/convolution-testing.js"></script>
|
| </head>
|
|
|
| <body>
|
| -
|
| -<div id="description"></div>
|
| -<div id="console"></div>
|
| -
|
| <script>
|
| -description("Tests ConvolverNode processing a mono channel with mono impulse response.");
|
| +let audit = Audit.createTaskRunner();
|
| +
|
| +//description("Tests ConvolverNode processing a mono channel with mono impulse response.");
|
|
|
| // To test the convolver, we convolve two square pulses together to
|
| // produce a triangular pulse. To verify the result is correct we
|
| @@ -26,14 +25,7 @@ description("Tests ConvolverNode processing a mono channel with mono impulse res
|
| // the part after the pulse is sufficiently close to zero. Finally,
|
| // the result should be exactly zero because the inputs are exactly
|
| // zero.
|
| -function runTest() {
|
| - if (window.testRunner) {
|
| - testRunner.dumpAsText();
|
| - testRunner.waitUntilDone();
|
| - }
|
| -
|
| - window.jsTestIsAsync = true;
|
| -
|
| +audit.define("test", function (task, should) {
|
| // Create offline audio context.
|
| var context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
|
|
|
| @@ -52,13 +44,14 @@ function runTest() {
|
|
|
| bufferSource.start(0);
|
|
|
| - context.oncomplete = checkConvolvedResult(trianglePulse);
|
| - context.startRendering();
|
| -}
|
| -
|
| -runTest();
|
| -successfullyParsed = true;
|
| -
|
| + context.startRendering()
|
| + .then(buffer => {
|
| + checkConvolvedResult(buffer, trianglePulse, should);
|
| + })
|
| + .then(task.done.bind(task));;
|
| +});
|
| +
|
| +audit.run();
|
| </script>
|
|
|
| </body>
|
|
|