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

Ensure the API roundtrips for opaque paths #728

Merged
merged 2 commits into from
Jan 2, 2023
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Dec 16, 2022

As opaque paths can end in U+0020, those trailing U+0020 code points need to be removed from the path when both query and fragment become null.

Fixes #651.

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

As opaque paths can end in U+0020, those trailing U+0020 code points need to be removed from the path when both query and fragment become null.

Tests: ...

Fixes #651.
@annevk annevk requested a review from domenic December 19, 2022 14:44
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.

I might be missing something but I think to make web-platform-tests/wpt#37556 pass you need to modify the pathname setter as well. I'm getting data:space vs. data:nospace and sc:space vs. sc:nospace failures when I try to implement this in jsdom/whatwg-url.

@annevk
Copy link
Member Author

annevk commented Dec 22, 2022

Thanks, I first thought I indeed had to update the pathname setter, but then I noticed that it has a no-op path for opaque paths. So I updated the tests some more so we have coverage for non-special URLs with opaque paths and non-opaque paths.

@annevk annevk requested a review from domenic December 22, 2022 14:06
annevk added a commit to web-platform-tests/wpt that referenced this pull request Jan 2, 2023
@annevk annevk merged commit fdaa0e5 into main Jan 2, 2023
@annevk annevk deleted the annevk/stripping-spaces branch January 2, 2023 15:38
domenic added a commit to jsdom/whatwg-url that referenced this pull request Jan 3, 2023
domenic added a commit to jsdom/whatwg-url that referenced this pull request Jan 3, 2023
domenic added a commit to jsdom/whatwg-url that referenced this pull request Jan 3, 2023
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 5, 2023
…ue paths, a=testonly

Automatic update from web-platform-tests
URL: hash/search roundtripping with opaque paths

For whatwg/url#728.
--

wpt-commits: c8ad978c6ff0792e5bb29da0eff600b4ba18cc46
wpt-pr: 37556
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Jan 13, 2023
…ue paths, a=testonly

Automatic update from web-platform-tests
URL: hash/search roundtripping with opaque paths

For whatwg/url#728.
--

wpt-commits: c8ad978c6ff0792e5bb29da0eff600b4ba18cc46
wpt-pr: 37556
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Setters can cause failure to roundtrip
2 participants