Skip to content

Commit

Permalink
Add tolerance for time comparison in playing-an-animation.html
Browse files Browse the repository at this point in the history
This test appears to occasionally fail. The suspected cause is a combination of:

* timer clamping (due to vsync) resulting in the current timeline time after
  resuming playback and the "ready time" being equal
* difference in floating-point precision used in calculating the two measures --
  one calculation done in JS and one done using the UA's internal representation
  of times.

Therefore this patch adds the standard tolerance for comparing time values to
this comparison.

Differential Revision: https://phabricator.services.mozilla.com/D3857

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1484901
gecko-commit: 58b3e727210440e6a7c26cf664ddc03f8d616822
gecko-integration-branch: autoland
gecko-reviewers: hiro
  • Loading branch information
birtles authored and moz-wptsync-bot committed Aug 22, 2018
1 parent ba5c61c commit 9e24201
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

assert_less_than_equal(
animation.startTime,
animation.timeline.currentTime - holdTime
animation.timeline.currentTime - holdTime + TIME_PRECISION
);
}, 'Resuming an animation from paused calculates start time from hold time');

Expand Down

0 comments on commit 9e24201

Please sign in to comment.