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

[URL] Add tests for the distinct percent-encode sets #27742

Merged
merged 2 commits into from Feb 24, 2021

Conversation

@alwinb
Copy link
Contributor

@alwinb alwinb commented Feb 23, 2021

This adds a number of test cases to test the distinct percent-encode sets as specified in the Percent-encoded bytes section of the WHATWG URL Standard.

Copy link
Member

@domenic domenic left a comment

Found a couple mismatches between this and jsdom/whatwg-url. Whether it's the tests that are wrong, or jsdom/whatwg-url, is unclear... let me know what you think.

"host": "host",
"hostname": "host",
"href": "wss://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/",
"origin": "null",

This comment has been minimized.

@domenic

domenic Feb 23, 2021
Member

jsdom/whatwg-url says this should be wss://host

"host": "host",
"hostname": "host",
"href": "wss://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/",
"origin": "null",

This comment has been minimized.

@domenic

domenic Feb 23, 2021
Member

jsdom/whatwg-url says this should be wss://host

@annevk
Copy link
Member

@annevk annevk commented Feb 23, 2021

They have an origin per https://url.spec.whatwg.org/#origin. Thanks for working on this @alwinb! Are you also planning to file browser bugs? I suspect some of these might be tracked already, but it might help to have a fresh one with all the relevant data in it.

@alwinb
Copy link
Contributor Author

@alwinb alwinb commented Feb 23, 2021

No you're right, the origin should be wss://host in those cases. I checked locally in the browser (via wpt serve) and did not spot this. This is why extra eyes are a good thing!

Copy link
Member

@domenic domenic left a comment

LGTM, all tests pass with jsdom/whatwg-url.

@annevk annevk merged commit 33f2e3f into web-platform-tests:master Feb 24, 2021
20 checks passed
20 checks passed
update-pr-preview
Details
Azure Pipelines Build #20210223.43 succeeded
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 (affected tests: Safari Technology Preview) affected tests: Safari Technology Preview succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests) wpt.fyi hook: safari-preview-affected-tests 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
lint Community-TC (pull_request)
Details
sink-task 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
wpt.fyi - safari[experimental] Safari results
Details
@alwinb
Copy link
Contributor Author

@alwinb alwinb commented Mar 2, 2021

@annevk I am a bit uneasy about filing browser bugs. I wonder if more will come up while I study this, and there are some issues that look like they will trigger additional small changes to the encode sets. I kind of prefer to send a single bug report to them rather than several with changes in a row. Maybe that's being too careful, but still...

@annevk
Copy link
Member

@annevk annevk commented Mar 2, 2021

Thanks for the update, I think that's fine in this case.

@alwinb alwinb deleted the alwinb:url-encode-sets branch Apr 10, 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.

None yet

5 participants