Bug 1427868 - Run skipped test cases for scrolled-out elements on Android. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Thu, 04 Jan 2018 15:22:34 +0900
changeset 715565 1583977346ccf0b41f51713582aabe260bca5e3a
parent 715543 7d81f423c7ff33c6be38b51e50bd8934e0b50dd9
child 744825 80512bd585769dbd30799477514bc5afd15b1dd1
push id94194
push userhikezoe@mozilla.com
push dateThu, 04 Jan 2018 06:22:51 +0000
reviewersbirtles
bugs1427868, 1421476, 1379515
milestone59.0a1
Bug 1427868 - Run skipped test cases for scrolled-out elements on Android. r?birtles These tests can be passed now, I don't know what fixed them, presumably bug 1421476 and bug 1379515 fixed it. MozReview-Commit-ID: 2srFKTWWvK
dom/animation/test/mozilla/file_restyles.html
--- a/dom/animation/test/mozilla/file_restyles.html
+++ b/dom/animation/test/mozilla/file_restyles.html
@@ -358,23 +358,16 @@ waitForAllPaints(() => {
     await ensureElementRemoval(div);
   });
 
   add_task_if_omta_enabled(async function no_restyling_compositor_animations_in_scrolled_out_element() {
     if (!offscreenThrottlingEnabled) {
       return;
     }
 
-    /*
-     On Android the opacity animation runs on the compositor even if it is
-     scrolled out of view.  We will fix this in bug 1247800.
-     */
-    if (isAndroid) {
-      return;
-    }
     var parentElement = addDiv(null,
       { style: 'overflow-y: scroll; height: 20px;' });
     var div = addDiv(null,
       { style: 'animation: opacity 100s; position: relative; top: 100px;' });
     parentElement.appendChild(div);
     var animation = div.getAnimations()[0];
 
     await animation.ready;
@@ -497,24 +490,16 @@ waitForAllPaints(() => {
     }
   );
 
   add_task(async function restyling_main_thread_animations_in_scrolled_out_element() {
     if (!offscreenThrottlingEnabled) {
       return;
     }
 
-    /*
-     On Android throttled animations are left behind on the main thread in some
-     frames, We will fix this in bug 1247800.
-     */
-    if (isAndroid) {
-      return;
-    }
-
     var parentElement = addDiv(null,
       { style: 'overflow-y: scroll; height: 20px;' });
     var div = addDiv(null,
       { style: 'animation: background-color 100s; position: relative; top: 20px;' });
     parentElement.appendChild(div);
     var animation = div.getAnimations()[0];
 
     await animation.ready;
@@ -538,24 +523,16 @@ waitForAllPaints(() => {
     await ensureElementRemoval(parentElement);
   });
 
   add_task(async function restyling_main_thread_animations_in_nested_scrolled_out_element() {
     if (!offscreenThrottlingEnabled) {
       return;
     }
 
-    /*
-     On Android throttled animations are left behind on the main thread in some
-     frames, We will fix this in bug 1247800.
-     */
-    if (isAndroid) {
-      return;
-    }
-
     var grandParent = addDiv(null,
       { style: 'overflow-y: scroll; height: 20px;' });
     var parentElement = addDiv(null,
       { style: 'overflow-y: scroll; height: 100px;' });
     var div = addDiv(null,
       { style: 'animation: background-color 100s; ' +
                'position: relative; ' +
                'top: 20px;' }); // This element is in-view in the parent, but
@@ -600,24 +577,16 @@ waitForAllPaints(() => {
     await ensureElementRemoval(div);
   });
 
   add_task(async function restyling_main_thread_animations_move_out_of_view_by_scrolling() {
     if (!offscreenThrottlingEnabled) {
       return;
     }
 
-    /*
-     On Android throttled animations are left behind on the main thread in some
-     frames, We will fix this in bug 1247800.
-     */
-    if (isAndroid) {
-      return;
-    }
-
     var parentElement = addDiv(null,
       { style: 'overflow-y: scroll; height: 200px;' });
     var div = addDiv(null,
       { style: 'animation: background-color 100s;' });
     var pad = addDiv(null,
       { style: 'height: 400px;' });
     parentElement.appendChild(div);
     parentElement.appendChild(pad);
@@ -1074,24 +1043,16 @@ waitForAllPaints(() => {
 
     is(markers.length, 0,
        'Animation running on the main-thread while computed timing is not ' +
        'changed should never cause restyles');
     await ensureElementRemoval(div);
   });
 
   add_task(async function no_throttling_animations_in_view_svg() {
-    /*
-     On Android throttled animations are left behind on the main thread in some
-     frames, We will fix this in bug 1247800.
-     */
-    if (isAndroid) {
-      return;
-    }
-
     var div = addDiv(null, { style: 'overflow: scroll;' +
                                     'height: 100px; width: 100px;' });
     var svg = addSVGElement(div, 'svg', { viewBox: '-10 -10 0.1 0.1',
                                           width:   '50px',
                                           height:  '50px' });
     var rect = addSVGElement(svg, 'rect', { x:      '-10',
                                             y:      '-10',
                                             width:  '10',
@@ -1109,24 +1070,16 @@ waitForAllPaints(() => {
     await ensureElementRemoval(div);
   });
 
   add_task(async function throttling_animations_out_of_view_svg() {
     if (!offscreenThrottlingEnabled) {
       return;
     }
 
-    /*
-     On Android throttled animations are left behind on the main thread in some
-     frames, We will fix this in bug 1247800.
-     */
-    if (isAndroid) {
-      return;
-    }
-
     var div = addDiv(null, { style: 'overflow: scroll;' +
                                     'height: 100px; width: 100px;' });
     var svg = addSVGElement(div, 'svg', { viewBox: '-10 -10 0.1 0.1',
                                           width: '50px',
                                           height: '50px' });
     var rect = addSVGElement(svg, 'rect', { width: '10',
                                             height: '10',
                                             fill: 'red' });
@@ -1138,24 +1091,16 @@ waitForAllPaints(() => {
     is(markers.length, 0,
        'CSS animations on an out-of-view svg element with post-transform ' +
        'should be throttled.');
 
     await ensureElementRemoval(div);
   });
 
   add_task(async function no_throttling_animations_in_view_css_transform() {
-    /*
-     On Android throttled animations are left behind on the main thread in some
-     frames, We will fix this in bug 1247800.
-     */
-    if (isAndroid) {
-      return;
-    }
-
     var scrollDiv = addDiv(null, { style: 'overflow: scroll; ' +
                                           'height: 100px; width: 100px;' });
     var targetDiv = addDiv(null,
                            { style: 'animation: background-color 100s;' +
                                     'transform: translate(-50px, -50px);' });
     scrollDiv.appendChild(targetDiv);
 
     var animation = targetDiv.getAnimations()[0];
@@ -1170,24 +1115,16 @@ waitForAllPaints(() => {
     await ensureElementRemoval(scrollDiv);
   });
 
   add_task(async function throttling_animations_out_of_view_css_transform() {
     if (!offscreenThrottlingEnabled) {
       return;
     }
 
-    /*
-     On Android throttled animations are left behind on the main thread in some
-     frames, We will fix this in bug 1247800.
-     */
-    if (isAndroid) {
-      return;
-    }
-
     var scrollDiv = addDiv(null, { style: 'overflow: scroll;' +
                                           'height: 100px; width: 100px;' });
     var targetDiv = addDiv(null,
                            { style: 'animation: background-color 100s;' +
                                     'transform: translate(100px, 100px);' });
     scrollDiv.appendChild(targetDiv);
 
     var animation = targetDiv.getAnimations()[0];