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

Tests for forbidden host code-points and resolution of non-special URLs #29246

Merged
merged 2 commits into from
Jun 16, 2021
Merged

Tests for forbidden host code-points and resolution of non-special URLs #29246

merged 2 commits into from
Jun 16, 2021

Conversation

alwinb
Copy link
Contributor

@alwinb alwinb commented Jun 6, 2021

This adds additional tests for:

  1. The forbidden host codepoints.
  2. Resolution of non-special URLs,
    e.g. abc:rootless against abc://host/path should result in abc:rootless.

Related issues:

/cc @TimothyGu

Edit It seems some of the forbidden host code points were already tested in #23572.
Let me know if I should remove the (few) duplicates.

@@ -7794,5 +7794,204 @@
"protocol": "wss:",
"search": "",
"username": ""
},
"Forbidden host codepoints",
{ "input": "foo://ho\u0000st/",
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to add these tests near the tests added in #23572?

Also, the prevailing style in the file is to have { not be on the same line as the first property.

"base": "about:blank",
"failure": true
},
"Ensure that non-special URLs use strict resolution",
Copy link
Member

@TimothyGu TimothyGu Jun 8, 2021

Choose a reason for hiding this comment

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

"strict resolution" isn't a term used in the URL Standard, though I know it is in RFC 3986. Let's just say

Suggested change
"Ensure that non-special URLs use strict resolution",
"Ensure that schemes are not dropped when resolving non-special URLs",

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

Normative content of tests LGTM, but it'd be great to address the style/naming issues pointed out by @TimothyGu.

@alwinb
Copy link
Contributor Author

alwinb commented Jun 8, 2021

I understand and agree, no need to point it out twice.

I moved the entire block of forbidden host codepoint tests up and removed the three duplicates.
I went with a just slightly different wording for the comment, I think it is a bit more clear.
I changed the formatting and also found one other line starting with { ". Of my hand I am afraid, apologies. I changed that one as well.

@annevk annevk requested a review from TimothyGu June 16, 2021 12:09
@TimothyGu TimothyGu merged commit 4159041 into web-platform-tests:master Jun 16, 2021
@GPHemsley GPHemsley removed their assignment Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants