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 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 kt3k:domexception-missing-error-codes branch from 09c1a72 to dde2ae4 Jan 15, 2021
domenic pushed a commit to heycam/webidl that referenced this pull request Jan 15, 2021
See discussion and tests in web-platform-tests/wpt#27181.
Copy link
Member

@domenic domenic left a comment

Really nice improvement; thanks!

@domenic domenic merged commit 93c6fac into web-platform-tests:master Jan 15, 2021
28 of 30 checks passed
28 of 30 checks passed
update-pr-preview
Details
Azure Pipelines Build #20210115.29 failed
Details
Azure Pipelines (affected tests: Safari Technology Preview) affected tests: Safari Technology Preview failed
Details
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
Azure Pipelines (affected tests without changes: Safari Technology Preview) affected tests without changes: Safari Technology Preview succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes) wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
download-firefox-nightly Community-TC (pull_request)
Details
infrastructure/ tests Community-TC (pull_request)
Details
infrastructure/ tests (Python 3) Community-TC (pull_request)
Details
lint Community-TC (pull_request)
Details
resources/ tests (Python 2) Community-TC (pull_request)
Details
resources/ tests (Python 3.6) Community-TC (pull_request)
Details
resources/ tests (Python 3.8) Community-TC (pull_request)
Details
sink-task Community-TC (pull_request)
Details
tools/ integration tests (Python 2) Community-TC (pull_request)
Details
tools/ integration tests (Python 3.6) Community-TC (pull_request)
Details
tools/ integration tests (Python 3.8) Community-TC (pull_request)
Details
tools/ unittests (Python 2) Community-TC (pull_request)
Details
tools/ unittests (Python 3.6) Community-TC (pull_request)
Details
tools/ unittests (Python 3.8) Community-TC (pull_request)
Details
update-built Community-TC (pull_request)
Details
wpt-chrome-dev-results Community-TC (pull_request)
Details
wpt-chrome-dev-results-without-changes Community-TC (pull_request)
Details
wpt-chrome-dev-stability Community-TC (pull_request)
Details
wpt-decision-task Community-TC (pull_request)
Details
wpt-firefox-nightly-results Community-TC (pull_request)
Details
wpt-firefox-nightly-results-without-changes Community-TC (pull_request)
Details
wpt-firefox-nightly-stability Community-TC (pull_request)
Details
wpt.fyi - chrome[experimental] Chrome results
Details
wpt.fyi - firefox[experimental] Firefox results
Details
@kt3k kt3k deleted the kt3k:domexception-missing-error-codes branch Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants