зеркало из https://github.com/mozilla/gecko-dev.git
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 Depends on D38808 --HG-- extra : rebase_source : 0e6724304ffc38c9566363f29c7a97a0af8e984a
This commit is contained in:
Родитель
76b62652f6
Коммит
b497d6b89c
|
@ -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`
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче