Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOMException] add test cases of error names table #27181

Merged

Conversation

kt3k
Copy link
Contributor

@kt3k kt3k commented Jan 14, 2021

This PR adds the test cases of error name to error code mapping of DOMException constructor. These cases are marked deprecated in WebIDL spec, but still part of web platform and should be tested. (ref: #27151 (comment))

closes #27151

@domenic
Copy link
Member

domenic commented Jan 14, 2021

Wow, this has actually found something very interesting. It appears that no browsers support "ValidationError", "NoDataAllowedError", or "DOMStringSizeError"! So we need to update the spec as well. Yay for test coverage!

In particular, the path is:

  • Update https://github.com/heycam/webidl/ to remove those three from the table.
  • Update this PR so that it tests that those values give 0, instead of their old numeric codes. It might be nice to group all these removed-from-implementation values in a separate section.
  • Optionally, add new tests that all the non-deprecated DOMException names that have no legacy error code, i.e. "EncodingError" onward, also give 0.

@kt3k kt3k force-pushed the domexception-missing-error-codes branch from 09c1a72 to dde2ae4 Compare January 15, 2021 14:20
domenic pushed a commit to whatwg/webidl that referenced this pull request Jan 15, 2021
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice improvement; thanks!

@domenic domenic merged commit 93c6fac into web-platform-tests:master Jan 15, 2021
@kt3k kt3k deleted the domexception-missing-error-codes branch January 16, 2021 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question about DOMException constructor behavior testing
3 participants