-
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
url: Stop passing DOMException.prototype to URLSearchParams's constructor. #6552
url: Stop passing DOMException.prototype to URLSearchParams's constructor. #6552
Conversation
Safari TP does pass this test. Is that https://bugs.webkit.org/show_bug.cgi?id=174216 then? @youennf thoughts? |
Firefox (nightly)Testing web-platform-tests at revision 7cfea82 All results1 test ran/url/urlsearchparams-constructor.html
|
Sauce (safari)Testing web-platform-tests at revision 7cfea82 All results1 test ran/url/urlsearchparams-constructor.html
|
Chrome (unstable)Testing web-platform-tests at revision 7cfea82 All results1 test ran/url/urlsearchparams-constructor.html
|
Sauce (MicrosoftEdge)Testing web-platform-tests at revision 7cfea82 All results1 test ran/url/urlsearchparams-constructor.html
|
I think so, Domenic filed that one after the spec change was merged. |
Maybe also add another test that ensures DOMException.prototype throws the correct exception. |
Isn't that already covered by #6361? |
Generally yes, but not the specific binding for this feature. It's always a little bit unclear to me how much we should test the binding on a per-feature basis, but some spot testing doesn't hurt I think. |
OK, so you mean specifically testing that |
Yeah, that's what I meant. I think it's in the same realm as testing that |
…ctor. As of whatwg/webidl#378, both new URLSearchParams(DOMException.prototype) DOMException.prototype.toString() are supposed to throw an exception due to brand checks in properties such as "name" and "message", which meant compliant implementations were always failing one of the tests here. Fix it by passing a `DOMException` instead: it has all the constants we need and passes the required property checks. Also assert that the previous behavior throws a TypeError.
I've added an |
As of whatwg/webidl#378, both
are supposed to throw an exception due to brand checks in properties such as
"name" and "message", which meant compliant implementations were always
failing one of the tests here.
Fix it by passing a
DOMException
instead: it has all the constants we needand passes the required property checks. Also assert that the previous
behavior throws a TypeError.