Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/webaudio/decodeAudioData/decode-audio-data-basic.html |
| diff --git a/third_party/WebKit/LayoutTests/webaudio/decodeAudioData/decode-audio-data-basic.html b/third_party/WebKit/LayoutTests/webaudio/decodeAudioData/decode-audio-data-basic.html |
| index c284544808daba6104907a285d00ace87fabe93d..1d48851bef26325cbdbeed99fca2bb71e1daf7f6 100644 |
| --- a/third_party/WebKit/LayoutTests/webaudio/decodeAudioData/decode-audio-data-basic.html |
| +++ b/third_party/WebKit/LayoutTests/webaudio/decodeAudioData/decode-audio-data-basic.html |
| @@ -8,11 +8,9 @@ |
| </head> |
| <body> |
| <script> |
| - // Use offline context for decoding because we want a fixed known sample |
| - // rate, independent of the hardware because the test file is encoded at |
| - // 44.1 kHz. If we don't, decodeAudioData() will resample the data messing |
| - // up the assumptions in this test. The length is unimportant. |
| - let context = new OfflineAudioContext(1, 1, 44100); |
| + // The functionality of decodeAudioData() is orthogonal to the type and the |
| + // state of AudioContext. So we use the online context in this test. |
|
Raymond Toy
2017/03/24 17:07:46
Add comment that any resampling of the test file i
hongchan
2017/03/24 19:00:36
Done.
|
| + let context = new AudioContext(); |
| // Test file URLs. |
| let validAudioFileUrl = '../resources/media/24bit-44khz.wav'; |
| @@ -114,8 +112,10 @@ |
| 'successCallback should not have invoked'); |
| }; |
| - let decodeAudioDataPromise = context.decodeAudioData( |
| - invalidArrayBuffer.slice(), successOrErrorCallback, successOrErrorCallback); |
| + let decodeAudioDataPromise = |
| + context.decodeAudioData(invalidArrayBuffer.slice(), |
| + successOrErrorCallback, |
| + successOrErrorCallback); |
|
hongchan
2017/03/24 16:52:18
Let me know if this change bothers you too much. I
|
| should(decodeAudioDataPromise, 'decodeAudioData promise') |
| .beRejected('EncodingError') |
| @@ -124,8 +124,7 @@ |
| // decodeAudioData() should be functional even after the associated context |
| // is closed. |
| - // TODO(crbug.com/692650) |
| - audit.define('close-context-with-pending-decode', (task, should) => { |
| + audit.define('decoding-on-closed-context', (task, should) => { |
| // Use one handler for resolve and reject. |promiseArg| is a parameter for |
| // handlers; it is a decoded audio buffer for success case and an error |
| // object for failure case. |