mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
Update web-platform-tests to revision c583bcd7eb30f38cb2d673031cde245776f1da5a
This commit is contained in:
parent
ba1ed11ced
commit
bd791500b2
107 changed files with 2870 additions and 469 deletions
|
@ -14,6 +14,15 @@ function importWorklet(worklet, code) {
|
|||
return worklet.addModule(url);
|
||||
}
|
||||
|
||||
async function animationFrames(frames) {
|
||||
for (let i = 0; i < frames; i++)
|
||||
await new Promise(requestAnimationFrame);
|
||||
}
|
||||
|
||||
async function workletPainted() {
|
||||
await animationFrames(2);
|
||||
}
|
||||
|
||||
// To make sure that we take the snapshot at the right time, we do double
|
||||
// requestAnimationFrame. In the second frame, we take a screenshot, that makes
|
||||
// sure that we already have a full frame.
|
||||
|
@ -24,10 +33,6 @@ async function importWorkletAndTerminateTestAfterAsyncPaint(worklet, code) {
|
|||
}
|
||||
|
||||
await importWorklet(worklet, code);
|
||||
|
||||
requestAnimationFrame(function() {
|
||||
requestAnimationFrame(function() {
|
||||
takeScreenshot();
|
||||
});
|
||||
});
|
||||
await workletPainted();
|
||||
takeScreenshot();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue