| Index: third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-multi-channels.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-multi-channels.html b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-multi-channels.html
|
| index 8fed30e3afd2243580e8d9a2ed3612a7e70b6b61..cb65942ae4f725f47c38a12b6a56447a3b4c3e20 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-multi-channels.html
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-multi-channels.html
|
| @@ -6,38 +6,42 @@ Test AudioBufferSourceNode supports 5.1 channel.
|
|
|
| <html>
|
| <head>
|
| +<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 type="text/javascript" src="../resources/mix-testing.js"></script>
|
| +<script src="../resources/audit.js"></script>
|
| +<script src="../resources/mix-testing.js"></script>
|
| </head>
|
| <body>
|
|
|
| <script>
|
| +let audit = Audit.createTaskRunner();
|
|
|
| -function runTest() {
|
| - if (!window.testRunner)
|
| - return;
|
| +audit.define('test', (task, should) => {
|
| + should(window.testRunner, 'window.testRunner').notBeEqualTo(undefined);
|
|
|
| - testRunner.waitUntilDone();
|
| + testRunner.waitUntilDone();
|
|
|
| - window.jsTestAsync = true;
|
| + // Create offline audio context
|
| + let sampleRate = 44100.0;
|
| + let context =
|
| + new OfflineAudioContext(6, sampleRate * toneLengthSeconds, sampleRate);
|
| + let toneBuffer = createToneBuffer(context, 440, toneLengthSeconds, 6);
|
|
|
| - // Create offline audio context
|
| - var sampleRate = 44100.0;
|
| - var context = new OfflineAudioContext(6, sampleRate * toneLengthSeconds, sampleRate);
|
| - var toneBuffer = createToneBuffer(context, 440, toneLengthSeconds, 6);
|
| + let source = context.createBufferSource();
|
| + source.buffer = toneBuffer;
|
|
|
| - var source = context.createBufferSource();
|
| - source.buffer = toneBuffer;
|
| + source.connect(context.destination);
|
| + source.start(0);
|
|
|
| - source.connect(context.destination);
|
| - source.start(0);
|
| + context.oncomplete = (event) => {
|
| + finishAudioTest(event);
|
| + task.done();
|
| + };
|
| + context.startRendering();
|
| +});
|
|
|
| - context.oncomplete = finishAudioTest;
|
| - context.startRendering();
|
| -}
|
| -
|
| -runTest();
|
| +audit.run();
|
| </script>
|
|
|
| </body>
|
|
|