Skip to content
Permalink
Browse files

Uses `assert_throws` instead of explicit try/catch

  • Loading branch information
samfoo committed Dec 3, 2015
1 parent 9668500 commit 7ba43913c2b7289d1120109d431741cac69eeac2
@@ -39,15 +39,9 @@ <h1>Text input element</h1>

test(
function() {
try {
assert_throws("INDEX_SIZE_ERR", function() {
document.getElementById("assign-negative").maxLength = -5;
} catch (e) {
if (e.name == "IndexSizeError") {
return;
}
}

throw new Error("expected IndexSizeError");
});
}, "Assigning negative integer throws IndexSizeError");

test(

0 comments on commit 7ba4391

Please sign in to comment.
You can’t perform that action at this time.