mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
test-web: Match WPT runner reftest-wait behavior
When a test has a `reftest-wait` class, we now wait for fonts to load and then for 2 `requestAnimationFrame` callbacks. This matches the behavior of the WPT runner and allows more imported WPT tests to work correctly.
This commit is contained in:
parent
504be366a2
commit
a959d4dca2
|
|
@ -314,7 +314,13 @@ function hasReftestWaitClass() {
|
|||
}
|
||||
|
||||
if (!hasReftestWaitClass()) {
|
||||
internals.signalTestIsDone("PASS");
|
||||
document.fonts.ready.then(() => {
|
||||
requestAnimationFrame(function() {
|
||||
requestAnimationFrame(function() {
|
||||
internals.signalTestIsDone("PASS");
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
const observer = new MutationObserver(() => {
|
||||
if (!hasReftestWaitClass()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user