Assert decodeAudioData not reach the catch

This commit is contained in:
CYBAI 2018-10-17 01:51:23 +08:00
parent b368e27dd5
commit 32185566c9
2 changed files with 12 additions and 12 deletions

View file

@ -663692,7 +663692,7 @@
"support" "support"
], ],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html": [ "webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html": [
"01ba3b122d8c9b5e8107cfc1226bb697e2929645", "b7e6b93ac42f6dc8b9435447b2b4f78e70c2b597",
"testharness" "testharness"
], ],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-one-sample-loop.html": [ "webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-one-sample-loop.html": [

View file

@ -27,17 +27,17 @@ Test AudioBufferSourceNode supports 5.1 channel.
6, sampleRate * toneLengthSeconds, sampleRate); 6, sampleRate * toneLengthSeconds, sampleRate);
}, 'Creating context for testing').notThrow(); }, 'Creating context for testing').notThrow();
should( should(
Audit Audit
.loadFileFromUrl( .loadFileFromUrl('audiobuffersource-multi-channels-expected.wav')
'audiobuffersource-multi-channels-expected.wav') .then(arrayBuffer => {
.then(arrayBuffer => { context.decodeAudioData(arrayBuffer).then(audioBuffer => {
context.decodeAudioData(arrayBuffer).then(audioBuffer => { expectedAudio = audioBuffer;
expectedAudio = audioBuffer; task.done();
task.done(); }).catch(error => {
}); assert_unreached("Could not decode audio data due to " + error.message);
}), })
'Fetching expected audio') })
.beResolved(); , 'Fetching expected audio').beResolved();
}); });
audit.define( audit.define(