зеркало из https://github.com/mozilla/gecko-dev.git
Bug 849230 follow-up: Fix expectException to actually check the exception code, and don't use imaginary DOMException names!
--HG-- extra : rebase_source : df53ddca50487bfc10676fd43e98abb949a2c298
This commit is contained in:
Родитель
8b7bb8e526
Коммит
817c75da3d
|
@ -37,10 +37,10 @@ addLoadEvent(function() {
|
|||
}
|
||||
expectException(function() {
|
||||
context.createBuffer(2, 2048, 7999);
|
||||
}, DOMException.DOM_SYNTAX_ERR);
|
||||
}, DOMException.SYNTAX_ERR);
|
||||
expectException(function() {
|
||||
context.createBuffer(2, 2048, 96001);
|
||||
}, DOMException.DOM_SYNTAX_ERR);
|
||||
}, DOMException.SYNTAX_ERR);
|
||||
context.createBuffer(2, 2048, 8000); // no exception
|
||||
context.createBuffer(2, 2048, 96000); // no exception
|
||||
SpecialPowers.clearUserPref("media.webaudio.enabled");
|
||||
|
|
|
@ -7,7 +7,7 @@ function expectException(func, exceptionCode) {
|
|||
} catch (ex) {
|
||||
threw = true;
|
||||
ok(ex instanceof DOMException, "Expect a DOM exception");
|
||||
ok(ex.code, exceptionCode, "Expect the correct exception code");
|
||||
is(ex.code, exceptionCode, "Expect the correct exception code");
|
||||
}
|
||||
ok(threw, "The exception was thrown");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче