Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/vs/base/test/browser/ui/animations/animations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ suite('Animations', () => {
const effect = particle.getAnimations()[0]?.effect as KeyframeEffect | undefined;
const duration = effect?.getTiming().duration;
const keyframes = effect?.getKeyframes();
// WebKit reports the duration rounded to whole microseconds, while the offsets were computed from the
// unrounded duration, so a 40ms step can read as up to 0.001ms longer.
return typeof duration === 'number'
&& duration >= 1150
&& duration < 1510
&& keyframes !== undefined
&& keyframes.length >= 30
&& keyframes.every((keyframe, index) =>
keyframe.easing === 'steps(1)' && (index === 0 || (keyframe.computedOffset - keyframes[index - 1].computedOffset) * duration <= 40 + 1e-10));
keyframe.easing === 'steps(1)' && (index === 0 || (keyframe.computedOffset - keyframes[index - 1].computedOffset) * duration <= 40 + 1e-3));
}),
allParticlesHaveShortFalls: particles.every(particle => {
const keyframes = (particle.getAnimations()[0]?.effect as KeyframeEffect | undefined)?.getKeyframes() ?? [];
Expand Down
Loading