mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 08:48:57 +00:00
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:
parent
be6a9940ad
commit
f62ccb010d
Notes:
github-actions[bot]
2024-12-19 17:28:40 +00:00
Author: https://github.com/AtkinsSJ
Commit: f62ccb010d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2979
Reviewed-by: https://github.com/gmta ✅
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue