feat(webview): implement cookie support#41393
Open
yury-s wants to merge 2 commits into
Open
Conversation
Wire up doGetCookies/addCookies/doClearCookies on WVBrowserContext using
the stock Web Inspector Page.getCookies/setCookie/deleteCookie commands.
These operate on the cookie store visible to the current page, so cookie
access is scoped to the current page's domain rather than the whole
context — a limitation of the iOS RDP protocol.
Also clear cookies in the webview test fixture teardown so the single
shared Mobile Safari cookie store doesn't leak state across tests.
Fixes the cookie API ("navigation response when URL has cookies") and the
cross-test cookie-leak failure ("should not override cookie header").
Keep only the non-obvious notes: the Page cookie commands are domain-scoped, and the test fixture clears cookies while still on the test's domain.
Contributor
Test results for "MCP"7354 passed, 1122 skipped Merge workflow run. |
Contributor
Test results for "tests 1"1 failed 48911 passed, 1142 skipped Merge workflow run. |
dcrousso
approved these changes
Jun 20, 2026
dcrousso
left a comment
Contributor
There was a problem hiding this comment.
lol i was just working on this earlier today! i had a very similar PR 😛
| session, | ||
| httpOnly: !!c.httpOnly, | ||
| secure: !!c.secure, | ||
| sameSite: c.sameSite ?? 'Lax', |
Contributor
There was a problem hiding this comment.
should this default to 'Lax' or 'None'?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cookies()/addCookies()/clearCookies()for the iOS WebView context using the stock Web InspectorPage.getCookies/setCookie/deleteCookiecommands.navigation response when URL has cookies,should not override cookie header).