Make the test not fail when the transition has completed already but the event hasn't fired yet. (Bug 537573) a=philor for APPROVAL REQUIRED
authorL. David Baron <dbaron@dbaron.org>
Fri, 23 Apr 2010 19:59:48 -0700
changeset 41235 6a2235219b22ce11c5287975f48810005b1a3e83
parent 41234 8e552e1afa49684b9ae702850e420da9e6bb155b
child 41236 2d1b5789e211a17e90eb08de310a416bbc79f3de
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilor
bugs537573
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Make the test not fail when the transition has completed already but the event hasn't fired yet. (Bug 537573) a=philor for APPROVAL REQUIRED
layout/style/test/test_transitions_events.html
--- a/layout/style/test/test_transitions_events.html
+++ b/layout/style/test/test_transitions_events.html
@@ -244,21 +244,25 @@ started_test();
 // and should thus get no event.
 $("five").style.color = "lime";
 
 // We cancel the transition on six by changing 'transition-duration' and
 // then changing the value, so we should get no event.
 $("six").style.color = "lime";
 
 setTimeout(function() {
+             if (cs("five") != "rgb(0, 255, 0)" &&
+                 cs("six") != "rgb(0, 255, 0)") {
+               // The transition hasn't finished already.
+               did_stops = true;
+             }
              $("five").style.MozTransitionProperty = "margin-left";
              $("six").style.MozTransitionDuration = "0s";
              $("six").style.MozTransitionDelay = "0s";
              $("six").style.color = "blue";
-             did_stops = true;
            }, 100);
 function poll_start_reversal() {
   if (cs("four").color != "rgb(0, 0, 255)") {
     // The forward transition has started.
     $("four").style.color = "blue";
   } else {
     // The forward transition has not started yet.
     setTimeout(poll_start_reversal, 20);