[Webkit-unassigned] [Bug 279079] New: [WebDriver][GLIB] Cookies tests failing to store cookies
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 3 11:31:12 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=279079
Bug ID: 279079
Summary: [WebDriver][GLIB] Cookies tests failing to store
cookies
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebDriver
Assignee: webkit-unassigned at lists.webkit.org
Reporter: lmoura at igalia.com
CC: bburg at apple.com
A number of WebDriver cookies tests are failing due to what seems to be a failure to write cookies.
Investigation on imported/w3c/webdriver/tests/classic/add_cookie/add.py:
Test code:
def test_add_session_cookie(session, url):
new_cookie = {
"name": "hello",
"value": "world"
}
session.url = url("/common/blank.html")
clear_all_cookies(session)
result = add_cookie(session, new_cookie)
assert_success(result)
cookie = session.cookies("hello")
Call stack for the failing case, from WebAutomationSession:
- `WebAutomationSession::addSingleCookie(...)`
- `APIHTTPCookieStore::setCookies(Vector<WebCore::Cookie>&&)`
- `WebCookieManager::setCookie(Vector<Cookie>&)`
- Iterates the cookies vector, calling:
- `NetworkStorageSession::setCookie(Cookie)` in `NetworkStorageSessionSoup.cpp`
The command setting the cookie returns success, but the actual call to `soup_cookie_jar_add_cookie(cookieStorage(), cookie.toSoupCookie());` in `NetworkStorageSession::setCookie(const Cookie& cookie)` doesn't emit the "changed" signal that would report the cookie was actually stored.
Setting cookies through JS works, even with `--automation`, which forces `webkit_website_data_manager_new_ephemeral()`. But these cookies arrive in the `NetworkStorageSession` through WebProcess' `WebCookieJar::setCookies(document, url, cookieString)`, which will end up calling `soup_cookie_jar_add_cookie_full/with_first_party`.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240903/bb223772/attachment.htm>
More information about the webkit-unassigned
mailing list