fune/testing/web-platform/meta/cookies/attributes
Valentin Gosu 0265423f41 Bug 1848226 - Marionette's driver.sys.mjs uses wrong URL for cookie operations r=edgul,webdriver-reviewers,whimboo
https://w3c.github.io/webdriver/#dfn-get-current-url says:
> For each cookie in all associated cookies of session's
> current browsing context's active document ...

However, the cookie implementations in driver.sys.mjs called _getCurrentURL
which returned the URL of the _top level browsing context_ as specified
in https://w3c.github.io/webdriver/#dfn-get-current-url

As a consequence, the cookie tests that set and deleted cookies
inside an iframe used the top level path for deleting cookies instead of
the path of the iframe, so they failed to find any cookies applicable
to that path.

For example running cookies/encoding/charset.html would set cookies
by calling `fetch('/cookies/resources/cookie.py?...')` then it would
try to delete cookies by calling getAndExpireCookiesForDefaultPathTest
which opened an iframe to /cookies/resources/echo-cookie.html
This iframe would call `setTestContextUsingRootWindow()` then call
`await test_driver.delete_all_cookies();` - but this call attempted to
delete cookies for the top level browing context's path - /cookies/encoding/

Differential Revision: https://phabricator.services.mozilla.com/D211434
2024-06-04 10:43:16 +00:00
..
attributes-ctl.sub.html.ini Bug 1892748 Part 2 - Reject cookies that end in a terminator character. r=dveditz,cookie-reviewers 2024-04-30 00:47:11 +00:00
domain.sub.html.ini
expires.html.ini
invalid.html.ini Bug 1848226 - Marionette's driver.sys.mjs uses wrong URL for cookie operations r=edgul,webdriver-reviewers,whimboo 2024-06-04 10:43:16 +00:00
max-age.html.ini Bug 1848226 - Marionette's driver.sys.mjs uses wrong URL for cookie operations r=edgul,webdriver-reviewers,whimboo 2024-06-04 10:43:16 +00:00
path-redirect.html.ini Bug 1848226 - Marionette's driver.sys.mjs uses wrong URL for cookie operations r=edgul,webdriver-reviewers,whimboo 2024-06-04 10:43:16 +00:00
path.html.ini Bug 1848226 - Marionette's driver.sys.mjs uses wrong URL for cookie operations r=edgul,webdriver-reviewers,whimboo 2024-06-04 10:43:16 +00:00