mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1000264 - Stop checking exceptions on decodeAudioData now that it uses promises, and check it in the promise test file instead. r=bz
--HG-- extra : rebase_source : 6860e1ff28b4bbb2d88db5bb5e679fc3da53b169
This commit is contained in:
parent
8eedddf1af
commit
ee5c85a5ac
@ -30,8 +30,9 @@ expectNoException(function() {
|
||||
p.then(function(data) {
|
||||
ok(false, "Promise should not resolve with an invalid source buffer.");
|
||||
finish();
|
||||
}).catch(function() {
|
||||
}).catch(function(e) {
|
||||
ok(true, "Promise should be rejected with an invalid source buffer.");
|
||||
ok(e.name == "TypeError", "The error should be TypeError");
|
||||
finish();
|
||||
})
|
||||
});
|
||||
|
@ -359,30 +359,6 @@ function loadNextTest() {
|
||||
}
|
||||
}
|
||||
|
||||
// Run some simple tests first
|
||||
function callbackShouldNeverRun() {
|
||||
ok(false, "callback should not fire");
|
||||
}
|
||||
(function() {
|
||||
var cx = new AudioContext();
|
||||
expectTypeError(function() {
|
||||
cx.decodeAudioData(null, callbackShouldNeverRun, callbackShouldNeverRun);
|
||||
});
|
||||
expectTypeError(function() {
|
||||
cx.decodeAudioData(undefined, callbackShouldNeverRun, callbackShouldNeverRun);
|
||||
});
|
||||
expectTypeError(function() {
|
||||
cx.decodeAudioData(123, callbackShouldNeverRun, callbackShouldNeverRun);
|
||||
});
|
||||
expectTypeError(function() {
|
||||
cx.decodeAudioData("buffer", callbackShouldNeverRun, callbackShouldNeverRun);
|
||||
});
|
||||
expectTypeError(function() {
|
||||
cx.decodeAudioData(new Uint8Array(100), callbackShouldNeverRun, callbackShouldNeverRun);
|
||||
});
|
||||
})();
|
||||
|
||||
// Now, let's get real!
|
||||
loadNextTest();
|
||||
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user