Closed Bug 1880131 Opened 3 months ago Closed 3 months ago

Remove "network.cookie.cookieBehavior" from CDP recommended preferences

Categories

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

defect
Points:
2

Tracking

(firefox125 fixed)

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: Sasha, Assigned: Sasha)

References

Details

(Whiteboard: [webdriver:m10])

Attachments

(2 files)

While working on the test, I've noticed that network.cookie.cookieBehavior which is set for CDP as 0 gets overridden (or reset) on the CI and get the default value 5 (see failing try push). At the same time, it works fine if the pref is added in COMMON_PREFERENCES (see passing try push).

My suggestion was to log more often the value of this preference so that it will be easier to see when the pref might get reset. A good place might be when a new BiDi command is send so that we can log it before and right after is has finished. Maybe this could give an idea why it gets reset.

I've pushed twice to try once with the network test on top of central, and it failed, and once on top of other cookies patches and it passed.
What I've noticed, that since the second push had much more tests, it changed the list of tests which were running in the scope of the chunk. In the failing chunk before running the bidi tests, we had this test running, and it was not included in the passing chunk. I've tried to run locally this test together with get_cookies/partition.py, and it failed the same way as on CI.

I've just also tried to add the test case:

def test_classic(session):
    print('test')

in the beginning of the get_cookies/partition.py file with network test, run only this file and that was enough to flip the pref

Yeah, the BiDi session is not used here and as such we restart the browser to have a classic only session. This means that CDP is not enabled as well and as such the preference is not getting set.

But any other test following using the BiDi session again should actually set the preference again given that CDP should be enabled as well.

As mentioned on Matrix, the test should actually pass regardless of the value of the preference and it's probably a sign that our implementation is not flexible enough here. However it could still be nice to have mozilla specific tests which make sure a similar test passes under different values of this preference.

(In reply to Julian Descottes [:jdescottes] from comment #5)

As mentioned on Matrix, the test should actually pass regardless of the value of the preference and it's probably a sign that our implementation is not flexible enough here. However it could still be nice to have mozilla specific tests which make sure a similar test passes under different values of this preference.

This part is moved to bug 1879503.

To avoid the problem of different values for "network.cookie.cookieBehavior" preference between CDP and WebDriverBiDi, we're going to try removing this preference from CDP.

Summary: Preference `network.cookie.cookieBehavior` get overwritten when running wdspec → Remove "network.cookie.cookieBehavior" from CDP recommended preferences
Assignee: nobody → aborovova
Status: NEW → ASSIGNED
Pushed by aborovova@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7e0fc55064a7
Remove "network.cookie.cookieBehavior" preference from CDP recommended preferences. r=webdriver-reviewers,jdescottes
https://hg.mozilla.org/integration/autoland/rev/fbb087d5e5b8
[wdspec] Remove test cases with cross-origin iframes which use document.cookie. r=webdriver-reviewers,whimboo,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
Points: --- → 2
Priority: -- → P2
Whiteboard: [webdriver:m10]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: