mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision 3f3849c5d05f9350fad0b06d3bb3ae30d7e18d14
This commit is contained in:
parent
9a7e2663e8
commit
f767403c00
310 changed files with 8134 additions and 895 deletions
|
@ -18,13 +18,20 @@ function registerConstantLocalTimeAnimator(localTime) {
|
|||
`);
|
||||
}
|
||||
|
||||
|
||||
function runInAnimationWorklet(code) {
|
||||
return CSS.animationWorklet.addModule(
|
||||
URL.createObjectURL(new Blob([code], {type: 'text/javascript'}))
|
||||
);
|
||||
}
|
||||
|
||||
function approxEquals(actual, expected){
|
||||
// precision in ms
|
||||
const epsilon = 0.005;
|
||||
const lowerBound = (expected - epsilon) < actual;
|
||||
const upperBound = (expected + epsilon) > actual;
|
||||
return lowerBound && upperBound;
|
||||
}
|
||||
|
||||
function waitForAsyncAnimationFrames(count) {
|
||||
// In Chrome, waiting for N+1 main thread frames guarantees that compositor has produced
|
||||
// at least N frames.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue