From f62ccb010dae91515ae38c15c73a7afa71401891 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 19 Dec 2024 14:18:45 +0000 Subject: [PATCH] Tests: Let WPT tests set their own timeout The official WPT runner supports a `` 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. --- .../LibWeb/Text/input/wpt-import/resources/testharness.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tests/LibWeb/Text/input/wpt-import/resources/testharness.js b/Tests/LibWeb/Text/input/wpt-import/resources/testharness.js index d56e05112d0..9d2d1f0a69a 100644 --- a/Tests/LibWeb/Text/input/wpt-import/resources/testharness.js +++ b/Tests/LibWeb/Text/input/wpt-import/resources/testharness.js @@ -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; }