зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
9993705c05
Коммит
02d66ae109
|
@ -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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче