headless-browser: Let tests set their own timeout duration

Some tests take longer than others, and so may want to set a custom
timeout so that they pass, without increasing the timeout for all other
tests. For example, this is done in WPT.

Add an `internals.setTestTimeout(milliseconds)` method that overrides
the test runner's default timeout for the currently-run test.
This commit is contained in:
Sam Atkins 2024-12-19 14:16:05 +00:00
commit be6a9940ad
Notes: github-actions[bot] 2024-12-19 17:28:47 +00:00
11 changed files with 42 additions and 0 deletions

View file

@ -366,6 +366,11 @@ void PageClient::page_did_finish_text_test(String const& text)
client().async_did_finish_text_test(m_id, text);
}
void PageClient::page_did_set_test_timeout(double milliseconds)
{
client().async_did_set_test_timeout(m_id, milliseconds);
}
void PageClient::page_did_request_context_menu(Web::CSSPixelPoint content_position)
{
client().async_did_request_context_menu(m_id, page().css_to_device_point(content_position).to_type<int>());