Bug 1366934 - Remove validation of transitioncancel/animationcanel event order tests. r=hiro
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Tue, 20 Jun 2017 14:31:41 +0900
changeset 365026 0277a0564bdb03267a10b5eb807d6067d5d80015
parent 365025 d9bead63025c1289f8b23444206bbd90a25e28fa
child 365027 ffe7ab5f00779d2389eb7b4daa58c9e7d6bbce23
push id91680
push userkwierso@gmail.com
push dateWed, 21 Jun 2017 01:32:01 +0000
treeherdermozilla-inbound@f7b9dc31956c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1366934
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1366934 - Remove validation of transitioncancel/animationcanel event order tests. r=hiro The animationcancel and transitioncancel is not absolute order when elapsed time of siblings cancel event is same. So we will not need to check the order of cancel events. MozReview-Commit-ID: 8fiwgcvTlwE
layout/style/test/stylo-failures.md
layout/style/test/test_animations_event_order.html
--- a/layout/style/test/stylo-failures.md
+++ b/layout/style/test/stylo-failures.md
@@ -36,19 +36,16 @@ to mochitest command.
   * test_media_queries_dynamic.html `restyle`: bug 1357461 [4]
   * test_media_queries_dynamic_xbl.html: xbl support bug 1290276 [1]
 * Animation support:
   * SMIL Animation
     * test_restyles_in_smil_animation.html [2]
 * console support bug 1352669
   * test_bug413958.html `monitorConsole` [3]
   * test_parser_diagnostics_unprintables.html [550]
-* Transition support:
-  * Events:
-    * test_animations_event_order.html [2]
 * Unimplemented \@font-face descriptors:
   * test_font_face_parser.html `font-language-override`: bug 1355364 [8]
 * keyword values should be preserved in \@font-face bug 1355368
   * test_font_face_parser.html `font-weight` [4]
   * test_font_loading_api.html `weight` [1]
 * @namespace support:
   * test_namespace_rule.html: bug 1355715 [6]
 * test_font_feature_values_parsing.html: \@font-feature-values support bug 1355721 [107]
--- a/layout/style/test/test_animations_event_order.html
+++ b/layout/style/test/test_animations_event_order.html
@@ -623,18 +623,16 @@ checkEventOrder([ divs[0], 'transitionru
                 [ divs[0], 'transitionend' ],
                 'Simultaneous transitionrun/start/end on siblings');
 
 divs.forEach(div => div.remove());
 divs = [];
 
 // 4j. Test sorting transitions with cancel
 // The order of transitioncancel is based on StyleManager.
-// So this test looks like wrong result at a glance. However
-// the gecko will cancel div1's transition before div2 in this case.
 
 divs = [ document.createElement('div'),
          document.createElement('div') ];
 divs.forEach((div, i) => {
   gDisplay.appendChild(div);
   div.style.marginLeft = '0px';
   div.setAttribute('id', 'div' + i);
 });
@@ -643,26 +641,32 @@ divs[0].style.transition = 'margin-left 
 divs[1].style.transition = 'margin-left 10s';
 
 getComputedStyle(divs[0]).marginLeft;
 divs.forEach(div => div.style.marginLeft = '100px');
 getComputedStyle(divs[0]).marginLeft;
 
 advance_clock(0);
 advance_clock(5 * 1000);
-divs.forEach(div =>  div.style.display = 'none' );
-getComputedStyle(divs[0]).display;
+divs.forEach(div =>  {
+  div.style.display = 'none';
+  // The transitioncancel event order is not absolute when firing siblings
+  // transitioncancel on same elapsed time.
+  // Force to flush style for the element so that the transition on the element
+  // iscancelled and corresponding cancel event is queued respectively.
+  getComputedStyle(div).display;
+});
 advance_clock(10 * 1000);
 
 checkEventOrder([ divs[0], 'transitionrun' ],
                 [ divs[1], 'transitionrun' ],
                 [ divs[1], 'transitionstart' ],
                 [ divs[0], 'transitionstart' ],
+                [ divs[0], 'transitioncancel' ],
                 [ divs[1], 'transitioncancel' ],
-                [ divs[0], 'transitioncancel' ],
                 'Simultaneous transitionrun/start/cancel on siblings');
 
 divs.forEach(div => div.remove());
 divs = [];
 
 
 // 4k. Test sorting animations with cancel
 
@@ -677,23 +681,29 @@ divs.forEach((div, i) => {
 
 divs[0].style.animation = 'anim 10s 5s';
 divs[1].style.animation = 'anim 10s';
 
 getComputedStyle(divs[0]).animation; // flush
 
 advance_clock(0);  // divs[1]'s animation start
 advance_clock(5 * 1000);  // divs[0]'s animation start
-divs.forEach(div => div.style.display = 'none' );
-getComputedStyle(divs[0]).display;
+divs.forEach(div => {
+  div.style.display = 'none';
+  // The animationcancel event order is not absolute when firing siblings
+  // animationcancel on same elapsed time.
+  // Force to flush style for the element so that the transition on the element
+  // iscancelled and corresponding cancel event is queued respectively.
+  getComputedStyle(div).display;
+});
 advance_clock(10 * 1000);
 
 checkEventOrder([ divs[1], 'animationstart' ],
                 [ divs[0], 'animationstart' ],
+                [ divs[0], 'animationcancel' ],
                 [ divs[1], 'animationcancel' ],
-                [ divs[0], 'animationcancel' ],
                 'Simultaneous animationcancel on siblings');
 
 SpecialPowers.DOMWindowUtils.restoreNormalRefresh();
 
 </script>
 </body>
 </html>