Closed Bug 1898222 Opened 2 months ago Closed 1 month ago

Introduce a workaround for "storage.setCookie" command until CHIPS support is enabled

Categories

(Remote Protocol :: WebDriver BiDi, task, P2)

task
Points:
2

Tracking

(firefox128 fixed)

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: Sasha, Assigned: Sasha)

References

(Blocks 1 open bug)

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: nobody → aborovova
Status: NEW → ASSIGNED
Whiteboard: [webdriver:triage]
Points: --- → 2
Priority: -- → P2
Whiteboard: [webdriver:triage] → [webdriver:m11]
Attachment #9403202 - Attachment description: WIP: Bug 1898222 - Introduce a workaround for "storage.setCookie" command until CHIPS support is enabled. → Bug 1898222 - [bidi] Introduce a workaround for "storage.setCookie" command until CHIPS support is enabled.
Pushed by aborovova@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4de5a0143e10
[bidi] Introduce a workaround for "storage.setCookie" command until CHIPS support is enabled. r=webdriver-reviewers,whimboo
https://hg.mozilla.org/integration/autoland/rev/8560ec202e95
[wpt] Use "storage.deleteCookies" in set_cookie fixture. r=webdriver-reviewers,whimboo
https://hg.mozilla.org/integration/autoland/rev/0aa517afc2a9
Update gecko specific test for "storage.setCookie" command. r=webdriver-reviewers,whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/46565 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m11] → [webdriver:m11], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
Upstream PR was closed without merging
Upstream PR was closed without merging
Upstream PR was closed without merging
Upstream PR merged by moz-wptsync-bot
Whiteboard: [webdriver:m11], [wptsync upstream] → [webdriver:m11], [wptsync upstream][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: