LibWeb+LibWebView: Add an internal API to expire cookies with an offset

Cookies have a minimum expiry resolution of 1 second. So to test cookie
expiration, the test had to idle for at least a second, which is quite a
noticeable delay now that LibWeb tests are parallelized.

Instead, we can add an internal API to expire cookies with a time offset
to avoid this idle delay.
This commit is contained in:
Timothy Flynn 2024-10-13 08:56:46 -04:00 committed by Andreas Kling
commit e070ed5658
Notes: github-actions[bot] 2024-10-14 06:54:34 +00:00
13 changed files with 51 additions and 24 deletions

View file

@ -502,6 +502,11 @@ void PageClient::page_did_update_cookie(Web::Cookie::Cookie cookie)
client().async_did_update_cookie(move(cookie));
}
void PageClient::page_did_expire_cookies_with_time_offset(AK::Duration offset)
{
client().async_did_expire_cookies_with_time_offset(offset);
}
void PageClient::page_did_update_resource_count(i32 count_waiting)
{
client().async_did_update_resource_count(m_id, count_waiting);