Chromium Code Reviews| 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..881ee20e17fb8128300140c80320f71f09dcc9c7 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.bind(task)); |
|
hongchan
2017/02/06 17:20:28
ditto.
Raymond Toy
2017/02/06 18:41:36
Done.
|
| +}); |
| -runTest(); |
| +audit.run(); |
| </script> |