| Index: third_party/WebKit/LayoutTests/webaudio/Delay/delaynode-scheduling.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/Delay/delaynode-scheduling.html b/third_party/WebKit/LayoutTests/webaudio/Delay/delaynode-scheduling.html
|
| index 255d329aa1f3c45e704b577fb2f4c190b252cf95..d8f3cd5f8656f07763ae8fc4af8e66961bb3def5 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/Delay/delaynode-scheduling.html
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/Delay/delaynode-scheduling.html
|
| @@ -2,28 +2,20 @@
|
|
|
| <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/delay-testing.js"></script>
|
| </head>
|
|
|
| <body>
|
| -
|
| -<div id="description"></div>
|
| -<div id="console"></div>
|
| -
|
| <script>
|
| -description("Tests that DelayNode delayTime parameter can be scheduled at a given time.");
|
| +let audit = Audit.createTaskRunner();
|
| +
|
| +audit.define("test", function (task, should) {
|
| + task.describe("DelayNode delayTime parameter can be scheduled at a given time");
|
|
|
| -function runTest() {
|
| - if (window.testRunner) {
|
| - testRunner.dumpAsText();
|
| - testRunner.waitUntilDone();
|
| - }
|
| -
|
| - window.jsTestIsAsync = true;
|
| -
|
| // Create offline audio context.
|
| var context = new OfflineAudioContext(1, sampleRate * renderLengthSeconds, sampleRate);
|
| var toneBuffer = createToneBuffer(context, 20, 20 * toneLengthSeconds, sampleRate); // 20Hz tone
|
| @@ -40,11 +32,12 @@ function runTest() {
|
| delay.connect(context.destination);
|
| bufferSource.start(0);
|
|
|
| - context.oncomplete = checkDelayedResult(toneBuffer);
|
| - context.startRendering();
|
| -}
|
| + context.startRendering()
|
| + .then(buffer => checkDelayedResult(buffer, toneBuffer, should))
|
| + .then(() => task.done());
|
| +});
|
|
|
| -runTest();
|
| +audit.run();
|
|
|
| </script>
|
|
|
|
|