Introduce a workaround for "storage.setCookie" command until CHIPS support is enabled
Categories
(Remote Protocol :: WebDriver BiDi, task, P2)
Tracking
(firefox128 fixed)
Tracking | Status | |
---|---|---|
firefox128 | --- | fixed |
People
(Reporter: Sasha, Assigned: Sasha)
References
Details
(Whiteboard: [webdriver:m11], [wptsync upstream][webdriver:relnote])
Attachments
(3 files)
At the moment, cookies, set with storage.setCookie
command, are not available in document.cookie
(which is expected by some Puppeteer tests). Basically this happens because we set partitionKey
in originAttributes
, this was recently fixed in the scope of this bug 1874174, but the changes are behind the feature flag network.cookie.cookieBehavior.optInPartitioning
. This feature flag should be replaced soon, by a new one network.cookie.CHIPS.enabled (see the bug 1886133). The plan is to enable it in Nightly from 128, and start ride the train from 130 (see this comment.
The idea would be until the CHIPS support is enabled do not partition cookies (meaning to not set the partition key) which are set for the same domain as the page loaded in the targeted context (in case partition type “context”).
Doing a quick check with this test, I could see that a cookie set with the Set-Cookie
header is present in document.cookie
and this cookie partitionKey
is equal to an empty string. So it looks like the proposal aligns with the current network requests behavior.
A work in progress patch is attached to illustrate the suggestion.
Pros:
- we don't have to wait for the preference to be enabled to start passing Puppeteer tests;
- seems to be aligning with the current network requests behavior.
Cons:
- diverges from the spec (?);
- requires the cleanup later.
Assignee | ||
Comment 1•11 months ago
|
||
Updated•11 months ago
|
Assignee | ||
Updated•11 months ago
|
Assignee | ||
Updated•11 months ago
|
Updated•11 months ago
|
Assignee | ||
Comment 2•11 months ago
|
||
Assignee | ||
Comment 3•11 months ago
|
||
Comment 6•11 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4de5a0143e10
https://hg.mozilla.org/mozilla-central/rev/8560ec202e95
https://hg.mozilla.org/mozilla-central/rev/0aa517afc2a9
Updated•10 months ago
|
Description
•