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

@ -44,6 +44,8 @@ public:
void simulate_drag_move(double x, double y);
void simulate_drop(double x, double y);
void expire_cookies_with_time_offset(WebIDL::LongLong seconds);
private:
explicit Internals(JS::Realm&);
virtual void initialize(JS::Realm&) override;