Commit Graph

4 Commits

Author SHA1 Message Date
Rocco Corsi
6fa32fbf69 Tests: Adjust timing in abortsignal-timeout test to avoid failure
Many clock related functions in Ladybird use the clock type called
CLOCK_MONOTONIC_COARSE to obtain timestamps. This is a less precise
clock and can be skewed by 1 or more milliseconds.

This less precise clock timing is causing the abortsignal-timeout.html
test to fail randomly as it expects the abort signal to arrive after
10ms, but in some cases it arrives at 9ms causing the test to fail. In
some very rare cases it could even arrive in 7ms or 8ms.

Test is changed to accept 9ms as a good result and if that is still
not enough the test also will display the timings so that further
investigations can be made.
2025-10-10 08:36:11 +02:00
Psychpsyo
b3487d8994 Meta: Add DOCTYPEs to most text tests 2025-03-20 11:50:49 +01:00
Tim Ledbetter
130f28cf50 LibWeb: Mark abort event as trusted before dispatching it
This matches the behavior of Firefox and Chrome.
2024-03-12 09:31:41 +01:00
Tim Ledbetter
ae42c6ed80 LibWeb: Implement AbortSignal.timeout()
This method returns a signal that will automatically abort after a
given number of milliseconds.
2024-02-28 07:42:43 -05:00