mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 10:15:41 +00:00
Bug 1387894 - Fix browser_animation_setCurrentTime.js for unconditional clamping r=birtles
This has to do with double imprecision. The test originally had toPrecision(6) to account for this imprecision. It'd round up 499.9999 into 500. When we send double(500) (which is an epsilon below 500) into ReduceTimePrecision we wind up coming out with 499.98. By reducing our precision requirement in this test we can handle that and round 499.98 back up to 500 Differential Revision: https://phabricator.services.mozilla.com/D38809 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
ab449f70cd
commit
5245b1205b
@ -40,7 +40,7 @@ async function testSetCurrentTimes(walker, animations) {
|
||||
const state = await players[i].getCurrentState();
|
||||
is(state.playState, "paused", `Player ${i + 1} is paused`);
|
||||
is(
|
||||
parseInt(state.currentTime.toPrecision(6), 10),
|
||||
parseInt(state.currentTime.toPrecision(4), 10),
|
||||
500,
|
||||
`Player ${i + 1} has the right currentTime`
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user