Tests: Let WPT tests set their own timeout

The official WPT runner supports a `<meta name=timeout content=long>`
tag to let tests opt-in to a longer timeout. Modify our harness to pass
that custom timeout to our runner, so that we don't incorrectly time
out if our default time is shorter than the requested one.
This commit is contained in:
Sam Atkins 2024-12-19 14:18:45 +00:00
parent be6a9940ad
commit f62ccb010d
Notes: github-actions[bot] 2024-12-19 17:28:40 +00:00

View file

@ -556,6 +556,13 @@
var test_environment = create_test_environment();
// Tell the ladybird test runner what our preferred timeout is
{
let timeout = test_environment.test_timeout();
if (timeout)
window.internals.setTestTimeout(timeout);
}
function is_shared_worker(worker) {
return 'SharedWorker' in global_scope && worker instanceof SharedWorker;
}