-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Correct result for passing DOMException.prototype to URLSearchParams #4581
Conversation
Chrome (unstable channel)Testing web-platform-tests at revision 98e4fcb All results/url/urlsearchparams-constructor.html
|
Firefox (nightly channel)Testing web-platform-tests at revision 98e4fcb All results/url/urlsearchparams-constructor.html
|
@@ -24,7 +24,7 @@ | |||
|
|||
test(() => { | |||
params = new URLSearchParams(DOMException.prototype); | |||
assert_equals(params.toString(), "Error=") | |||
assert_equals(params.toString(), "INDEX_SIZE_ERR=1&&HIERARCHY_REQUEST_ERR=3&WRONG_DOCUMENT_ERR=4&INVALID_CHARACTER_ERR=5&NO_MODIFICATION_ALLOWED_ERR=7&NOT_FOUND_ERR=8&NOT_SUPPORTED_ERR=9&INUSE_ATTRIBUTE_ERR=10&INVALID_STATE_ERR=11&SYNTAX_ERR=12&INVALID_MODIFICATION_ERR=13&NAMESPACE_ERR=14&SECURITY_ERR=18&NETWORK_ERR=19&ABORT_ERR=20&URL_MISMATCH_ERR=21"A_EXCEEDED_ERR=22&TIMEOUT_ERR=23&INVALID_NODE_TYPE_ERR=24&DATA_CLONE_ERR=25") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&& after INDEX_SIZE_ERR=1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well spotted. Sorry for that.
LGTM but we should get @cdumez's review too I think |
@@ -24,7 +24,7 @@ | |||
|
|||
test(() => { | |||
params = new URLSearchParams(DOMException.prototype); | |||
assert_equals(params.toString(), "Error=") | |||
assert_equals(params.toString(), "INDEX_SIZE_ERR=1&HIERARCHY_REQUEST_ERR=3&WRONG_DOCUMENT_ERR=4&INVALID_CHARACTER_ERR=5&NO_MODIFICATION_ALLOWED_ERR=7&NOT_FOUND_ERR=8&NOT_SUPPORTED_ERR=9&INUSE_ATTRIBUTE_ERR=10&INVALID_STATE_ERR=11&SYNTAX_ERR=12&INVALID_MODIFICATION_ERR=13&NAMESPACE_ERR=14&SECURITY_ERR=18&NETWORK_ERR=19&ABORT_ERR=20&URL_MISMATCH_ERR=21"A_EXCEEDED_ERR=22&TIMEOUT_ERR=23&INVALID_NODE_TYPE_ERR=24&DATA_CLONE_ERR=25") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, Webkit nightly is getting:
INDEX_SIZE_ERR=1&DOMSTRING_SIZE_ERR=2&HIERARCHY_REQUEST_ERR=3&WRONG_DOCUMENT_ERR=4&INVALID_CHARACTER_ERR=5&NO_DATA_ALLOWED_ERR=6&NO_MODIFICATION_ALLOWED_ERR=7&NOT_FOUND_ERR=8&NOT_SUPPORTED_ERR=9&INUSE_ATTRIBUTE_ERR=10&INVALID_STATE_ERR=11&SYNTAX_ERR=12&INVALID_MODIFICATION_ERR=13&NAMESPACE_ERR=14&INVALID_ACCESS_ERR=15&VALIDATION_ERR=16&TYPE_MISMATCH_ERR=17&SECURITY_ERR=18&NETWORK_ERR=19&ABORT_ERR=20&URL_MISMATCH_ERR=21"A_EXCEEDED_ERR=22&TIMEOUT_ERR=23&INVALID_NODE_TYPE_ERR=24&DATA_CLONE_ERR=25
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it looks like we have the following extras:
DOMSTRING_SIZE_ERR=2
NO_DATA_ALLOWED_ERR=6
INVALID_ACCESS_ERR=15
VALIDATION_ERR=16
TYPE_MISMATCH_ERR=17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Web IDL spec [1] still seems to contain the deprecated constants that WebKit supports. Am I missing something?
[1] https://heycam.github.io/webidl/#idl-DOMException-error-names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem is with IDL. It only talks about one table, while in fact there are two. And for defining properties order is somewhat important, but with two tables order is lost.
I filed whatwg/webidl#284 and will push an update to this test shortly.
LGTM. |
See discussion in https://bugs.webkit.org/show_bug.cgi?id=166973.