Bug 1264107 - Use shorter duration to avoid possibilities of overflow on TimeStamp calculations. r?birtles draft
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Tue, 05 Jul 2016 19:27:20 +0900
changeset 383937 609bd49cadd448b46d8a23982d49c62d2e3f2708
parent 383779 c9a70b64f2faa264296f0cc90d68a2ee2bac6ac5
child 524577 ddba440b180c09900d2b31fb08ffef09c2488867
push id22132
push userhiikezoe@mozilla-japan.org
push dateTue, 05 Jul 2016 10:27:59 +0000
reviewersbirtles
bugs1264107
milestone50.0a1
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
dom/animation/test/chrome/test_animation_observers.html
--- 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\"");