Bug 1264107 - Use shorter duration to avoid possibilities of overflow on TimeStamp calculations. r?birtles
If there is a possibility that long duration property causes overflow on
TimeStamp calculations, we should use shorter duration in our tests.
MozReview-Commit-ID: HJThoX80W4Y
--- a/dom/animation/test/chrome/test_animation_observers.html
+++ b/dom/animation/test/chrome/test_animation_observers.html
@@ -1535,22 +1535,23 @@ addAsyncAnimTest("tree_ordering", { obse
yield await_frame();
assert_records([{ added: [], changed: [anim], removed: [] }],
"records after duration is changed");
anim.effect.timing.duration = 100 * MS_PER_SEC;
yield await_frame();
assert_records([], "records after assigning same value");
- anim.currentTime = 500 * MS_PER_SEC;
+ anim.currentTime = anim.effect.timing.duration * 2;
+ anim.finish();
yield await_frame();
assert_records([{ added: [], changed: [], removed: [anim] }],
"records after animation end");
- anim.effect.timing.duration = 1000 * MS_PER_SEC;
+ anim.effect.timing.duration = anim.effect.timing.duration * 3;
yield await_frame();
assert_records([{ added: [anim], changed: [], removed: [] }],
"records after animation restarted");
anim.effect.timing.duration = "auto";
yield await_frame();
assert_records([{ added: [], changed: [], removed: [anim] }],
"records after duration set \"auto\"");