fune/testing/web-platform/meta/cookies/name/name.html.ini
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

6 lines
220 B
INI

[name.html]
[Return the most recent nameless cookie, even if preceded by =, in addition to other valid cookie]
expected:
if (os == "mac") and not debug: FAIL
if os == "android": FAIL
[FAIL, PASS]