Skip to content

Commit

Permalink
Tests: Let WPT tests set their own timeout
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AtkinsSJ committed Dec 19, 2024
1 parent 6b9539e commit d8c789b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Tests/LibWeb/Text/input/wpt-import/resources/testharness.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d8c789b

Please sign in to comment.