Skip to content

Commit

Permalink
Bug 1686645 [wpt PR 27181] - [DOMException] add test cases of error n…
Browse files Browse the repository at this point in the history
…ames table, a=testonly

Automatic update from web-platform-tests
DOMException: test code mapping for all error names

In particular, this tests the deprecated ones, some removed ones, and some newer error names which intentionally don't have legacy error codes. See also whatwg/webidl#946.

Closes #27151.
--

wpt-commits: 93c6faceda56025f1c96c0155990bf1d231dac9c
wpt-pr: 27181
  • Loading branch information
kt3k authored and moz-wptsync-bot committed Jan 19, 2021
1 parent be27f41 commit 809531b
Showing 1 changed file with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,33 @@ test(function() {
{name: "InvalidModificationError", code: 13},
{name: "NamespaceError", code: 14},
{name: "InvalidAccessError", code: 15},
{name: "TypeMismatchError", code: 17},
{name: "SecurityError", code: 18},
{name: "NetworkError", code: 19},
{name: "AbortError", code: 20},
{name: "URLMismatchError", code: 21},
{name: "QuotaExceededError", code: 22},
{name: "TimeoutError", code: 23},
{name: "InvalidNodeTypeError", code: 24},
{name: "DataCloneError", code: 25}
{name: "DataCloneError", code: 25},

// These were removed from the error names table.
// See https://github.com/heycam/webidl/pull/946.
{name: "DOMStringSizeError", code: 0},
{name: "NoDataAllowedError", code: 0},
{name: "ValidationError", code: 0},

// The error names which don't have legacy code values.
{name: "EncodingError", code: 0},
{name: "NotReadableError", code: 0},
{name: "UnknownError", code: 0},
{name: "ConstraintError", code: 0},
{name: "DataError", code: 0},
{name: "TransactionInactiveError", code: 0},
{name: "ReadOnlyError", code: 0},
{name: "VersionError", code: 0},
{name: "OperationError", code: 0},
{name: "NotAllowedError", code: 0}
].forEach(function(test_case) {
test(function() {
var ex = new DOMException("msg", test_case.name);
Expand Down

0 comments on commit 809531b

Please sign in to comment.