Bug 1241692 - Part 2: We should observe stylings only for animations. r?dholbert draft
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Sat, 06 Feb 2016 20:38:24 +0900
changeset 329416 390b0bb74fe55286d47f299071dd51300bfa754a
parent 329415 c77f030fda0541c1cef06dda31c51dfa06fafeca
child 513956 8497da40951aabadcf887b81946ff174f595dbbe
push id10521
push userhiikezoe@mozilla-japan.org
push dateSat, 06 Feb 2016 22:03:17 +0000
reviewersdholbert
bugs1241692
milestone47.0a1
Bug 1241692 - Part 2: We should observe stylings only for animations. r?dholbert We don't need observe restylings other than animations. If those restylings happen, it's just noise for this test. We should drop them.
dom/animation/test/chrome/test_restyles.html
--- a/dom/animation/test/chrome/test_restyles.html
+++ b/dom/animation/test/chrome/test_restyles.html
@@ -41,17 +41,19 @@ function observeStyling(frameCount, onFr
   docShell.recordProfileTimelineMarkers = true;
   docShell.popProfileTimelineMarkers();
 
   return new Promise(function(resolve) {
     return waitForAnimationFrames(frameCount, onFrame).then(function() {
       var markers = docShell.popProfileTimelineMarkers();
       docShell.recordProfileTimelineMarkers = false;
       var stylingMarkers = markers.filter(function(marker, index) {
-        return marker.name == 'Styles';
+        return marker.name == 'Styles' &&
+               (marker.restyleHint == 'eRestyle_CSSAnimations' ||
+                marker.restyleHint == 'eRestyle_CSSTransitions');
       });
       resolve(stylingMarkers);
     });
   });
 }
 
 function ensureElementRemoval(aElement) {
   return new Promise(function(resolve) {