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

URLSearchParams.prototype.sort() #4531

Merged
merged 2 commits into from
Jan 18, 2017
Merged

URLSearchParams.prototype.sort() #4531

merged 2 commits into from
Jan 18, 2017

Conversation

annevk
Copy link
Member

@annevk annevk commented Jan 12, 2017

See whatwg/url#26 for context.

@wpt-pr-bot
Copy link
Collaborator

annevk added a commit to whatwg/url that referenced this pull request Jan 12, 2017
This method is added to increase cache hits when making requests. It’s
opt-in as the order of code points in a URL’s query is significant by
default. It’s up to applications to decide if name order is not
significant for them.

Tests: web-platform-tests/wpt#4531.

Fixes #26.
@wpt-stability-bot
Copy link

wpt-stability-bot commented Jan 12, 2017

Chrome

Testing revision 1a4a2cd
Starting 10 test iterations
All results were stable

All results

/url/urlsearchparams-sort.html
Subtest Results
OK
Parse and sort: é&e�&é FAIL
URL parse and sort: ffi&🌈 FAIL
Parse and sort: �=x&&�=a FAIL
Parse and sort: z=b&a=b&z=a&a=a FAIL
Parse and sort: ffi&🌈 FAIL
URL parse and sort: é&e�&é FAIL
URL parse and sort: �=x&&�=a FAIL
URL parse and sort: z=b&a=b&z=a&a=a FAIL

@wpt-stability-bot
Copy link

wpt-stability-bot commented Jan 12, 2017

Firefox

Testing revision 1a4a2cd
Starting 10 test iterations
All results were stable

All results

/url/urlsearchparams-sort.html
Subtest Results
OK
Parse and sort: é&e�&é FAIL
URL parse and sort: ffi&🌈 FAIL
Parse and sort: �=x&&�=a FAIL
Parse and sort: z=b&a=b&z=a&a=a FAIL
Parse and sort: ffi&🌈 FAIL
URL parse and sort: é&e�&é FAIL
URL parse and sort: �=x&&�=a FAIL
URL parse and sort: z=b&a=b&z=a&a=a FAIL

"input": "\uFFFD=x&\uFFFC&\uFFFD=a",
"output": [["\uFFFC", ""], ["\uFFFD", "x"], ["\uFFFD", "a"]]
}
].forEach((val) => {
Copy link
Member

Choose a reason for hiding this comment

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

I think we need at least a few tests on Unicode inputs, to show what type of sorting is being applied here. I assume it's just going to be by character code, so instead of sorting é near e, it'll sort after the usual alphabet? Tests to confirm.

@annevk annevk requested a review from domenic January 17, 2017 09:45
@annevk
Copy link
Member Author

annevk commented Jan 17, 2017

What do you think?

@annevk annevk merged commit 97d3246 into master Jan 18, 2017
@annevk annevk deleted the annevk/URLSearchParams-sort branch January 18, 2017 07:45
annevk added a commit to whatwg/url that referenced this pull request Jan 18, 2017
This method is added to increase cache hits when making requests. It’s
opt-in as the order of code points in a URL’s query is significant by
default. It’s up to applications to decide if name order is not
significant for them.

Tests: web-platform-tests/wpt#4531.

Fixes #26.
TimothyGu added a commit to TimothyGu/node that referenced this pull request Feb 11, 2017
TimothyGu added a commit to nodejs/node that referenced this pull request Feb 14, 2017
PR-URL: #11098
Fixes: #10760
Ref: whatwg/url#26
Ref: whatwg/url#199
Ref: web-platform-tests/wpt#4531
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
TimothyGu added a commit to nodejs/node that referenced this pull request Feb 14, 2017
TimothyGu added a commit to TimothyGu/node that referenced this pull request Feb 18, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 20, 2017
italoacasas pushed a commit to nodejs/node that referenced this pull request Feb 22, 2017
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.

4 participants