mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision 06f77f6bfaa86f3643a79f1ec2c49c6b6955cf18
This commit is contained in:
parent
1981efcc35
commit
c6c4fb2f7a
108 changed files with 2090 additions and 138 deletions
|
@ -1,12 +1,8 @@
|
|||
// 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.
|
||||
function importWorkletAndTerminateTestAfterAsyncPaint(worklet, code) {
|
||||
if (typeof worklet === 'undefined') {
|
||||
takeScreenshot();
|
||||
return;
|
||||
}
|
||||
|
||||
// Imports code into a worklet. E.g.
|
||||
//
|
||||
// importWorklet(CSS.paintWorklet, {url: 'script.js'});
|
||||
// importWorklet(CSS.paintWorklet, '/* javascript string */');
|
||||
function importWorklet(worklet, code) {
|
||||
let url;
|
||||
if (typeof code === 'object') {
|
||||
url = code.url;
|
||||
|
@ -15,11 +11,23 @@ function importWorkletAndTerminateTestAfterAsyncPaint(worklet, code) {
|
|||
url = URL.createObjectURL(blob);
|
||||
}
|
||||
|
||||
worklet.addModule(url).then(function() {
|
||||
return worklet.addModule(url);
|
||||
}
|
||||
|
||||
// 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.
|
||||
async function importWorkletAndTerminateTestAfterAsyncPaint(worklet, code) {
|
||||
if (typeof worklet === 'undefined') {
|
||||
takeScreenshot();
|
||||
return;
|
||||
}
|
||||
|
||||
await importWorklet(worklet, code);
|
||||
|
||||
requestAnimationFrame(function() {
|
||||
requestAnimationFrame(function() {
|
||||
requestAnimationFrame(function() {
|
||||
takeScreenshot();
|
||||
});
|
||||
takeScreenshot();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue