Update web-platform-tests to revision c583bcd7eb30f38cb2d673031cde245776f1da5a

This commit is contained in:
WPT Sync Bot 2018-11-02 21:35:53 -04:00
parent ba1ed11ced
commit bd791500b2
107 changed files with 2870 additions and 469 deletions

View file

@ -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();
}