Bug 1254840 - Use longer animation duration to avoid intermittent failures on slow platforms. r=dholbert
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Thu, 10 Mar 2016 09:36:04 +0900
changeset 311796 b0e1cefc94ce86adc374eb2d05791b00e0753b20
parent 311795 006e29abfc8ebf0531d932ddcfafea769fe13921
child 311797 dd1abe874252e507b825a0a4e1063b0e13578288
child 311847 0028f61d45266d0fdfe9c597a06274ba2c5eeac0
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1254840
milestone48.0a1
Bug 1254840 - Use longer animation duration to avoid intermittent failures on slow platforms. r=dholbert MozReview-Commit-ID: FXrO0yI7Irt
dom/animation/test/chrome/test_restyles.html
--- a/dom/animation/test/chrome/test_restyles.html
+++ b/dom/animation/test/chrome/test_restyles.html
@@ -343,29 +343,32 @@ waitForAllPaints(function() {
     is(markers.length, 1,
        'Bug 1235478: Animations running on the compositor should only once ' +
        'update style when currentTime is set to middle of duration time');
     yield ensureElementRemoval(div);
   });
 
   add_task_if_omta_enabled(function* change_duration_and_currenttime() {
     var div = addDiv(null);
-    var animation = div.animate({ opacity: [ 0, 1 ] }, 10000);
+    var animation = div.animate({ opacity: [ 0, 1 ] }, 100000); //100s
 
     yield animation.ready;
     ok(animation.isRunningOnCompositor);
 
-    animation.currentTime = 50000;
+    // Set currentTime to a time longer than duration.
+    animation.currentTime = 500000; // 500s
 
+    // Now the animation immediately get back from compositor.
     ok(!animation.isRunningOnCompositor);
 
-    animation.effect.timing.duration = 100000;
+    // Extend the duration.
+    animation.effect.timing.duration = 800000; // 800s
     var markers = yield observeStyling(5);
     is(markers.length, 1,
-       'Animations running on the compositor should update style' +
+       'Animations running on the compositor should update style ' +
        'when timing.duration is made longer than the current time');
 
     yield ensureElementRemoval(div);
   });
 
 });
 
 </script>