1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:07:34 +00:00

Browser: Add update_cookie WebDriver IPC endpoint

Through this the WebDriver will be able to change cookies. Needed for
deleting cookies.
This commit is contained in:
Tobias Christiansen 2022-10-16 19:49:39 +02:00 committed by Linus Groh
parent 30360918d4
commit c710780852
3 changed files with 12 additions and 0 deletions

View file

@ -95,4 +95,14 @@ Messages::WebDriverSessionClient::GetNamedCookieResponse WebDriverConnection::ge
return { {} };
}
void WebDriverConnection::update_cookie(Web::Cookie::Cookie const& cookie)
{
if (auto browser_window = m_browser_window.strong_ref()) {
auto& tab = browser_window->active_tab();
if (tab.on_update_cookie) {
tab.on_update_cookie(tab.url(), cookie);
}
}
}
}