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:
Paul Adenot 2014-11-14 09:37:39 +01:00
Родитель 9993705c05
Коммит 02d66ae109
2 изменённых файлов: 2 добавлений и 25 удалений

Просмотреть файл

@ -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>