Uses assert_throws instead of explicit try/catch

This commit is contained in:
Sam Gibson 2015-12-02 15:19:31 +11:00
parent 9668500e97
commit 7ba43913c2

View file

@ -39,15 +39,9 @@
test( test(
function() { function() {
try { assert_throws("INDEX_SIZE_ERR", function() {
document.getElementById("assign-negative").maxLength = -5; document.getElementById("assign-negative").maxLength = -5;
} catch (e) { });
if (e.name == "IndexSizeError") {
return;
}
}
throw new Error("expected IndexSizeError");
}, "Assigning negative integer throws IndexSizeError"); }, "Assigning negative integer throws IndexSizeError");
test( test(