This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Testing constructors with no arguments misses some ways of disabling constructors #970
Labels
Component: Custom
Anything related to the custom tests, IDL, or other injections
Priority 3 (Medium)
Medium priority, should be done but can wait
Comments
Here's the code: mdn-bcd-collector/static/resources/harness.js Lines 113 to 145 in 213350e
We already check for "Illegal constructor" but that doesn't help if we invoke the constructor with too few arguments. |
jugglinmike
added a commit
to bocoup/browser-compat-data
that referenced
this issue
Sep 28, 2022
The mdn-bcd-collector tool has a deficiency which cause it to produce incorrect changes for the Notification constructor. See "Testing constructors with no arguments misses some ways of disabling constructors": foolip/mdn-bcd-collector#970
jugglinmike
added a commit
to bocoup/browser-compat-data
that referenced
this issue
Dec 2, 2022
The mdn-bcd-collector tool has a deficiency which cause it to produce incorrect changes for the Notification constructor. See "Testing constructors with no arguments misses some ways of disabling constructors": foolip/mdn-bcd-collector#970
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Component: Custom
Anything related to the custom tests, IDL, or other injections
Priority 3 (Medium)
Medium priority, should be done but can wait
mdn/browser-compat-data#7923 revealed that there's a problem with our generated tests for the
Notification
constructor, which testingnew Notification('hello')
(and expecting that to work) would have avoided.The problem is that we're probing for error messages thrown by generated bindings for anything that has a Web IDL constructor, but it's also possible to disable constructors by throwing exceptions from non-generated code.
We could add "Illegal constructor" to the list of strings that we check for, butthe general problem can only be solved by invoking the constructor in a way that should work, and only treating it as supported if it does. Unfortunately this would be a lot of work...The text was updated successfully, but these errors were encountered: