mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Update web-platform-tests to revision a46616a5b18e83587ddbbed756c7b96cbb4b015d
This commit is contained in:
parent
3f07cfec7c
commit
578498ba24
4001 changed files with 159517 additions and 30260 deletions
18
tests/wpt/web-platform-tests/common/css-paint-tests.js
Normal file
18
tests/wpt/web-platform-tests/common/css-paint-tests.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// 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 importPaintWorkletAndTerminateTestAfterAsyncPaint(code) {
|
||||
if (typeof paintWorklet == "undefined") {
|
||||
takeScreenshot();
|
||||
} else {
|
||||
var blob = new Blob([code], {type: 'text/javascript'});
|
||||
paintWorklet.addModule(URL.createObjectURL(blob)).then(function() {
|
||||
requestAnimationFrame(function() {
|
||||
requestAnimationFrame(function() {
|
||||
takeScreenshot();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue