Skip to content

Conversation

@annevk
Copy link
Member

@annevk annevk commented Aug 12, 2025

@wpt-pr-bot
Copy link
Collaborator

There are no reviewers for this pull request. Please reach out on the chat room to get help with this. Thank you!

annevk added a commit to annevk/WebKit that referenced this pull request Aug 12, 2025
annevk added a commit to annevk/WebKit that referenced this pull request Aug 12, 2025
annevk added a commit to annevk/WebKit that referenced this pull request Aug 13, 2025
annevk added a commit to annevk/WebKit that referenced this pull request Aug 14, 2025
assert_equals(internalCookie.path, currentDirectory);
}, 'CookieListItem - cookieStore.set with empty string path defaults to current URL');

promise_test(async testCase => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't get this one, why is the cookie rejected? Doesn't this pose some back-compat risk?

Copy link
Member Author

Choose a reason for hiding this comment

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

It rejects in Chrome today. The reason is that the path becomes /cookiestore and it has to be / for a __host--prefixed cookie.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks! Optionally, it might be worthwhile to add a comment to that effect.

Copy link
Contributor

@yoavweiss yoavweiss left a comment

Choose a reason for hiding this comment

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

LGTM

@annevk annevk merged commit 6575356 into master Aug 14, 2025
25 checks passed
@annevk annevk deleted the annevk/cookie-store-set-empty-string-path branch August 14, 2025 15:07
annevk added a commit to whatwg/cookiestore that referenced this pull request Aug 14, 2025
Also correct the algorithm as it incorrectly assumed that path could be null when in fact it's always a string.

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

Closes #242.
webkit-commit-queue pushed a commit to annevk/WebKit that referenced this pull request Aug 14, 2025
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