Browser+WebContent+WebDriver: Move Get Named Cookie to WebContent

Instead of sending *all* cookies over IPC and filtering by name, we now
filter by name from the cookie jar and send just the first matching
cookie.
This commit is contained in:
Timothy Flynn 2022-11-11 09:55:11 -05:00 committed by Linus Groh
parent c6a0888088
commit a3d6c2f6af
Notes: sideshowbarker 2024-07-17 04:35:15 +09:00
14 changed files with 51 additions and 57 deletions

View file

@ -762,8 +762,7 @@ Web::WebDriver::Response Client::handle_get_named_cookie(Vector<StringView> cons
{
dbgln_if(WEBDRIVER_DEBUG, "Handling GET /session/<session_id>/cookie/<name>");
auto* session = TRY(find_session_with_id(parameters[0]));
auto cookies = TRY(session->get_named_cookie(parameters[1]));
return make_json_value(cookies);
return session->web_content_connection().get_named_cookie(parameters[1]);
}
// 14.3 Add Cookie, https://w3c.github.io/webdriver/#dfn-adding-a-cookie