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"
],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html": [
"01ba3b122d8c9b5e8107cfc1226bb697e2929645",
"b7e6b93ac42f6dc8b9435447b2b4f78e70c2b597",
"testharness"
],
"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);
}, 'Creating context for testing').notThrow();
should(
Audit
.loadFileFromUrl(
'audiobuffersource-multi-channels-expected.wav')
.then(arrayBuffer => {
context.decodeAudioData(arrayBuffer).then(audioBuffer => {
expectedAudio = audioBuffer;
task.done();
});
}),
'Fetching expected audio')
.beResolved();
Audit
.loadFileFromUrl('audiobuffersource-multi-channels-expected.wav')
.then(arrayBuffer => {
context.decodeAudioData(arrayBuffer).then(audioBuffer => {
expectedAudio = audioBuffer;
task.done();
}).catch(error => {
assert_unreached("Could not decode audio data due to " + error.message);
})
})
, 'Fetching expected audio').beResolved();
});
audit.define(