mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Uses assert_throws
instead of explicit try/catch
This commit is contained in:
parent
9668500e97
commit
7ba43913c2
1 changed files with 2 additions and 8 deletions
|
@ -39,15 +39,9 @@
|
|||
|
||||
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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue