LibWeb: Implement CookieStore::get(name)

This commit is contained in:
Idan Horowitz 2025-08-05 23:05:45 +03:00 committed by Tim Flynn
commit 5545d38d7a
Notes: github-actions[bot] 2025-08-08 17:12:25 +00:00
14 changed files with 174 additions and 17 deletions

View file

@ -2148,7 +2148,7 @@ Messages::WebDriverClient::GetAllCookiesResponse WebDriverConnection::get_all_co
// 4. For each cookie in all associated cookies of the current browsing contexts active document:
auto* document = current_browsing_context().active_document();
for (auto const& cookie : current_browsing_context().page().client().page_did_request_all_cookies(document->url())) {
for (auto const& cookie : current_browsing_context().page().client().page_did_request_all_cookies_webdriver(document->url())) {
// 1. Let serialized cookie be the result of serializing cookie.
auto serialized_cookie = serialize_cookie(cookie);
@ -3070,7 +3070,7 @@ void WebDriverConnection::delete_cookies(Optional<StringView> const& name)
// For each cookie among all associated cookies of the current browsing contexts active document, un the substeps of the first matching condition:
auto* document = current_browsing_context().active_document();
for (auto& cookie : current_browsing_context().page().client().page_did_request_all_cookies(document->url())) {
for (auto& cookie : current_browsing_context().page().client().page_did_request_all_cookies_webdriver(document->url())) {
// -> name is undefined
// -> name is equal to cookie name
if (!name.has_value() || name.value() == cookie.name) {