Back out parts 22-29 from bug 927349 for causing intermittent test failure in css-animations/test_animation-pausing.html on 10.8
authorBrian Birtles <birtles@gmail.com>
Fri, 26 Dec 2014 11:54:43 +0900
changeset 238108 3470cdf1cfa8804570b77850020be5083547c1d9
parent 238107 260f7fb1596acf95356a1995eab3dadb8765fb34
child 238109 2959e44dd6f5fb8fd6a7935908f45c228b62914b
push id7472
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 20:36:27 +0000
treeherdermozilla-aurora@300ca104f8fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs927349
milestone37.0a1
Back out parts 22-29 from bug 927349 for causing intermittent test failure in css-animations/test_animation-pausing.html on 10.8
browser/components/places/tests/browser/browser.ini
dom/animation/AnimationPlayer.cpp
dom/animation/AnimationPlayer.h
dom/animation/test/chrome/test_running_on_compositor.html
dom/animation/test/css-animations/test_animation-player-playstate.html
dom/animation/test/css-animations/test_animation-player-ready.html
dom/animation/test/css-transitions/test_animation-player-ready.html
dom/animation/test/mochitest.ini
dom/animation/test/mozilla/test_deferred_start.html
layout/base/RestyleManager.cpp
layout/style/nsTransitionManager.cpp
toolkit/devtools/server/actors/animation.js
toolkit/devtools/server/tests/browser/browser_animation_actors_04.js
--- a/browser/components/places/tests/browser/browser.ini
+++ b/browser/components/places/tests/browser/browser.ini
@@ -43,17 +43,17 @@ skip-if = e10s # Bug ?????? - test fails
 skip-if = true
 
 [browser_library_infoBox.js]
 [browser_markPageAsFollowedLink.js]
 skip-if = e10s # Bug 933103 - mochitest's EventUtils.synthesizeMouse functions not e10s friendly (test does EventUtils.sendMouseEvent...)
 [browser_toolbar_migration.js]
 [browser_library_batch_delete.js]
 [browser_555547.js]
-skip-if = e10s || (os == "win" && !debug) # Bug 1115276
+skip-if = e10s
 [browser_416459_cut.js]
 skip-if = e10s # Bug ?????? - clipboard operations don't seem to work in this test?
 [browser_library_downloads.js]
 [browser_library_left_pane_select_hierarchy.js]
 [browser_435851_copy_query.js]
 skip-if = e10s
 [browser_toolbarbutton_menu_context.js]
 skip-if = e10s
--- a/dom/animation/AnimationPlayer.cpp
+++ b/dom/animation/AnimationPlayer.cpp
@@ -128,55 +128,35 @@ AnimationPlayer::SetSource(Animation* aS
   if (mSource) {
     mSource->SetParentTime(GetCurrentTime());
   }
 }
 
 void
 AnimationPlayer::Tick()
 {
-  // FIXME (bug 1112969): Check if we are pending but have lost access to the
-  // pending player tracker. If that's the case we should probably trigger the
-  // animation now.
-
   UpdateSourceContent();
 }
 
 void
 AnimationPlayer::StartNow()
 {
-  // This method is only expected to be called for an animation that is
-  // waiting to play. We can easily adapt it to handle other states
-  // but it's currently not necessary.
-  MOZ_ASSERT(PlayState() == AnimationPlayState::Pending,
-             "Expected to start a pending player");
-  MOZ_ASSERT(!mHoldTime.IsNull(),
-             "A player in the pending state should have a resolved hold time");
+  // Currently we only expect this method to be called when we are in the
+  // middle of initiating/resuming playback so we should have an unresolved
+  // start time to update and a fixed current time to seek to.
+  MOZ_ASSERT(mStartTime.IsNull() && !mHoldTime.IsNull(),
+             "Resolving the start time but we don't appear to be waiting"
+             " to begin playback");
 
   Nullable<TimeDuration> readyTime = mTimeline->GetCurrentTime();
-
-  // FIXME (bug 1096776): If readyTime.IsNull(), we should return early here.
-  // This will leave mIsPending = true but the caller will remove us from the
-  // PendingPlayerTracker if we were added there.
-  // Then, in Tick(), if we have:
-  // - a resolved timeline, and
-  // - mIsPending = true, and
-  // - *no* document or we are *not* in the PendingPlayerTracker
-  // then we should call StartNow.
-  //
-  // For now, however, we don't support inactive/missing timelines so
-  // |readyTime| should be resolved.
+  // Bug 1096776: Once we support disappearing or inactive timelines we
+  // will need special handling here.
   MOZ_ASSERT(!readyTime.IsNull(), "Missing or inactive timeline");
-
   mStartTime.SetValue(readyTime.Value() - mHoldTime.Value());
   mHoldTime.SetNull();
-  mIsPending = false;
-
-  UpdateSourceContent();
-  PostUpdate();
 
   if (mReady) {
     mReady->MaybeResolve(this);
   }
 }
 
 void
 AnimationPlayer::Cancel()
@@ -261,37 +241,17 @@ AnimationPlayer::DoPlay()
   } else if (mHoldTime.IsNull()) {
     // If the hold time is null, we are already playing normally
     return;
   }
 
   // Clear ready promise. We'll create a new one lazily.
   mReady = nullptr;
 
-  mIsPending = true;
-
-  nsIDocument* doc = GetRenderedDocument();
-  if (!doc) {
-    // If we have no rendered document (e.g. because the source content's
-    // target element is orphaned), then treat the animation as ready and
-    // start it immediately. It is probably preferable to make playing
-    // *always* asynchronous (e.g. by setting some additional state that
-    // marks this player as pending and queueing a runnable to resolve the
-    // start time). That situation, however, is currently rare enough that
-    // we don't bother for now.
-    StartNow();
-    return;
-  }
-
-  PendingPlayerTracker* tracker = doc->GetOrCreatePendingPlayerTracker();
-  tracker->AddPlayPending(*this);
-
-  // We may have updated the current time when we set the hold time above
-  // so notify source content.
-  UpdateSourceContent();
+  StartNow();
 }
 
 void
 AnimationPlayer::DoPause()
 {
   if (mIsPending) {
     CancelPendingPlay();
     // Resolve the ready promise since we currently only use it for
--- a/dom/animation/AnimationPlayer.h
+++ b/dom/animation/AnimationPlayer.h
@@ -90,37 +90,18 @@ public:
   // PauseFromJS is currently only here for symmetry with PlayFromJS but
   // in future we will likely have to flush style in
   // CSSAnimationPlayer::PauseFromJS so we leave it for now.
   void PauseFromJS() { Pause(); }
 
   void SetSource(Animation* aSource);
   void Tick();
 
-  /**
-   * Sets the start time of a player that is waiting to play to the current
-   * time of its timeline.
-   *
-   * This will reset the pending flag if the call succeeded. The caller is
-   * responsible for removing the player from the PendingPlayerTracker though.
-   *
-   * Typically, when a player is played, it does not start immediately but is
-   * added to a table of pending players on the document of its source content.
-   * In the meantime it sets its hold time to the time from which should
-   * begin playback.
-   *
-   * When the document finishes painting, any pending players in its table
-   * are started by calling this method.
-   *
-   * This approach means that any setup time required for performing the
-   * initial paint of an animation such as layerization is not deducted from
-   * the running time of the animation. Without this we can easily drop the
-   * first few frames of an animation, or, on slower devices, the whole
-   * animation.
-   */
+  // Sets the start time of a player that is waiting to play to the current
+  // time of its timeline.
   void StartNow();
   void Cancel();
 
   const nsString& Name() const {
     return mSource ? mSource->Name() : EmptyString();
   }
 
   bool IsPaused() const { return PlayState() == AnimationPlayState::Paused; }
--- a/dom/animation/test/chrome/test_running_on_compositor.html
+++ b/dom/animation/test/chrome/test_running_on_compositor.html
@@ -39,26 +39,28 @@ const OMTAPrefKey = 'layers.offmainthrea
 var omtaEnabled = SpecialPowers.DOMWindowUtils.layerManagerRemote &&
                   SpecialPowers.getBoolPref(OMTAPrefKey);
 
 // FIXME: When we implement Element.animate, use that here instead of CSS
 // so that we remove any dependency on the CSS mapping.
 div.style.animation = 'anim 100s';
 var player = div.getAnimationPlayers()[0];
 
-player.ready.then(function() {
+// Wait so that animation can be set up.
+// FIXME: When we implement the AnimationPlayer.ready promise we should wait
+// on that here.
+window.requestAnimationFrame(function() {
   is(player.isRunningOnCompositor, omtaEnabled,
      'AnimationPlayer reports that it is running on the compositor'
      + ' during playback');
 
   div.style.animationPlayState = 'paused';
   window.getComputedStyle(div).animationPlayState;
 
-  // FIXME: When we implement deferred pausing (bug 1109390), we should wait
-  // on player.ready here.
+  // FIXME: Likewise, we should wait on AnimationPlayer.ready here too.
   window.requestAnimationFrame(function() {
     is(player.isRunningOnCompositor, false,
        'AnimationPlayer reports that it is NOT running on the compositor'
        + ' when paused');
     SimpleTest.finish();
   });
 });
 </script>
--- a/dom/animation/test/css-animations/test_animation-player-playstate.html
+++ b/dom/animation/test/css-animations/test_animation-player-playstate.html
@@ -11,17 +11,18 @@
 'use strict';
 
 async_test(function(t) {
   var div = addDiv(t);
   var cs = window.getComputedStyle(div);
   div.style.animation = 'anim 1000s';
 
   var player = div.getAnimationPlayers()[0];
-  assert_equals(player.playState, 'pending');
+  assert_equals(player.playState, 'running');
+  // Bug 927349: Check for pending state here
 
   player.ready.then(t.step_func(function() {
     assert_equals(player.playState, 'running');
     t.done();
   }));
 }, 'Player returns correct playState when running');
 
 test(function(t) {
@@ -46,14 +47,13 @@ test(function(t) {
 test(function(t) {
   var div = addDiv(t);
   var cs = window.getComputedStyle(div);
   div.style.animation = 'anim 1000s paused';
 
   var player = div.getAnimationPlayers()[0];
   div.style.animationPlayState = 'running';
   // This test also checks that calling playState flushes style
-  assert_equals(player.playState, 'pending',
-                'Player.playState reports pending after updating'
-                + ' animation-play-state (got: ' + player.playState + ')');
+  // Bug 927349: Make this check for 'pending'
+  assert_equals(player.playState, 'running');
 }, 'Player.playState updates when resumed by setting style');
 
 </script>
--- a/dom/animation/test/css-animations/test_animation-player-ready.html
+++ b/dom/animation/test/css-animations/test_animation-player-ready.html
@@ -70,67 +70,9 @@ async_test(function(t) {
   player.ready.then(function(resolvedPlayer) {
     assert_equals(resolvedPlayer, player,
                   'Object identity of player passed to Promise callback'
                   + ' matches the player object owning the Promise');
     t.done();
   });
 }, 'The ready promise is fulfilled with its AnimationPlayer');
 
-async_test(function(t) {
-  var div = addDiv(t);
-
-  // Set up pending animation
-  div.style.animation = 'abc 100s';
-  var player = div.getAnimationPlayers()[0];
-  assert_equals(player.playState, 'pending', 'Player is initially pending');
-
-  // Set up listeners on ready promise
-  player.ready.then(t.step_func(function() {
-    assert_unreached('ready promise is fulfilled');
-  })).catch(t.step_func(function(err) {
-    assert_equals(err.name, 'AbortError',
-                  'ready promise is rejected with AbortError');
-    assert_equals(player.playState, 'idle',
-                  'Player is idle after animation was cancelled');
-  })).then(t.step_func(function() {
-    t.done();
-  }));
-
-  // Now cancel the animation and flush styles
-  div.style.animation = '';
-  window.getComputedStyle(div).animation;
-
-}, 'ready promise is rejected when an animation is cancelled by resetting'
-   + ' the animation property');
-
-async_test(function(t) {
-  var div = addDiv(t);
-
-  // As before, but this time instead of removing all animations, simply update
-  // the list of animations. At least for Firefox, updating is a different
-  // code path.
-
-  // Set up pending animation
-  div.style.animation = 'abc 100s';
-  var player = div.getAnimationPlayers()[0];
-  assert_equals(player.playState, 'pending', 'Player is initially pending');
-
-  // Set up listeners on ready promise
-  player.ready.then(t.step_func(function() {
-    assert_unreached('ready promise was fulfilled');
-  })).catch(t.step_func(function(err) {
-    assert_equals(err.name, 'AbortError',
-                  'ready promise is rejected with AbortError');
-    assert_equals(player.playState, 'idle',
-                  'Player is idle after animation was cancelled');
-  })).then(t.step_func(function() {
-    t.done();
-  }));
-
-  // Now update the animation and flush styles
-  div.style.animation = 'def 100s';
-  window.getComputedStyle(div).animation;
-
-}, 'ready promise is rejected when an animation is cancelled by updating'
-   + ' the animation property');
-
 </script>
--- a/dom/animation/test/css-transitions/test_animation-player-ready.html
+++ b/dom/animation/test/css-transitions/test_animation-player-ready.html
@@ -30,41 +30,9 @@ async_test(function(t) {
     assert_not_equals(player.ready, originalReadyPromise,
                       'Ready promise object identity differs after calling'
                       + ' play()');
     t.done();
   }));
 }, 'A new ready promise is created each time play() is called'
    + ' the animation property');
 
-async_test(function(t) {
-  var div = addDiv(t);
-
-  // Set up pending transition
-  div.style.transform = 'translate(0px)';
-  window.getComputedStyle(div).transform;
-  div.style.transition = 'transform 100s';
-  div.style.transform = 'translate(10px)';
-  window.getComputedStyle(div).transform;
-
-  var player = div.getAnimationPlayers()[0];
-  assert_equals(player.playState, 'pending', 'Player is initially pending');
-
-  // Set up listeners on ready promise
-  player.ready.then(t.step_func(function() {
-    assert_unreached('ready promise was fulfilled');
-  })).catch(t.step_func(function(err) {
-    assert_equals(err.name, 'AbortError',
-                  'ready promise is rejected with AbortError');
-    assert_equals(player.playState, 'idle',
-                  'Player is idle after transition was cancelled');
-  })).then(t.step_func(function() {
-    t.done();
-  }));
-
-  // Now remove transform from transition-property and flush styles
-  div.style.transitionProperty = 'none';
-  window.getComputedStyle(div).transitionProperty;
-
-}, 'ready promise is rejected when a transition is cancelled by updating'
-   + ' transition-property');
-
 </script>
--- a/dom/animation/test/mochitest.ini
+++ b/dom/animation/test/mochitest.ini
@@ -13,10 +13,8 @@ skip-if = buildapp == 'mulet'
 [css-animations/test_element-get-animation-players.html]
 skip-if = buildapp == 'mulet'
 [css-transitions/test_animation-effect-name.html]
 [css-transitions/test_animation-pausing.html]
 [css-transitions/test_animation-player-ready.html]
 [css-transitions/test_animation-target.html]
 [css-transitions/test_element-get-animation-players.html]
 skip-if = buildapp == 'mulet'
-[mozilla/test_deferred_start.html]
-skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && toolkit != 'gonk') # bug 1113425
deleted file mode 100644
--- a/dom/animation/test/mozilla/test_deferred_start.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="../testcommon.js"></script>
-<div id="log"></div>
-<style>
-@keyframes empty { }
-@keyframes animTransform {
-  from { transform: translate(0px); }
-  to { transform: translate(100px); }
-}
-.target {
-  // Element needs geometry to be eligible for layerization
-  width: 100px;
-  height: 100px;
-  background-color: white;
-}
-</style>
-<script>
-'use strict';
-
-function waitForDocLoad() {
-  return new Promise(function(resolve, reject) {
-    if (document.readyState === 'complete') {
-      resolve();
-    } else {
-      window.addEventListener('load', resolve);
-    }
-  });
-}
-
-async_test(function(t) {
-  var div = addDiv(t);
-  var cs = window.getComputedStyle(div);
-
-  // Test that empty animations actually start.
-  //
-  // Normally we tie the start of animations to when their first frame of
-  // the animation is rendered. However, for animations that don't actually
-  // trigger a paint (e.g. because they are empty, or are animating something
-  // that doesn't render or is offscreen) we want to make sure they still
-  // start.
-  //
-  // Before we start, wait for the document to finish loading. This is because
-  // during loading we will have other paint events taking place which might,
-  // by luck, happen to trigger animations that otherwise would not have been
-  // triggered, leading to false positives.
-  //
-  // As a result, it's better to wait until we have a more stable state before
-  // continuing.
-  var promiseCallbackDone = false;
-  waitForDocLoad().then(function() {
-    div.style.animation = 'empty 1000s';
-    var player = div.getAnimationPlayers()[0];
-
-    player.ready.then(function() {
-      promiseCallbackDone = true;
-    }).catch(function() {
-      assert_unreached('ready promise was rejected');
-    });
-
-  }).then(waitForFrame).then(t.step_func(function() {
-    assert_true(promiseCallbackDone,
-                'ready promise callback was called before the next'
-                + ' requestAnimationFrame callback');
-    t.done();
-  }));
-}, 'AnimationPlayer.ready is resolved for an empty animation');
-
-// Test that compositor animations with delays get synced correctly
-//
-// NOTE: It is important that we DON'T use
-// SpecialWindows.DOMWindowUtils.advanceTimeAndRefresh here since that takes
-// us through a different code path.
-async_test(function(t) {
-  // This test only applies to compositor animations
-  const OMTAPrefKey = 'layers.offmainthreadcomposition.async-animations';
-  var omtaEnabled = SpecialPowers.DOMWindowUtils.layerManagerRemote &&
-                    SpecialPowers.getBoolPref(OMTAPrefKey);
-  if (!omtaEnabled) {
-    t.done();
-    return;
-  }
-
-  // Setup animation
-  var div = addDiv(t);
-  div.classList.add('target');
-  div.style.animation = 'animTransform 100s -50s forwards';
-  var player = div.getAnimationPlayers()[0];
-
-  player.ready.then(t.step_func(function() {
-    var transformStr =
-      SpecialPowers.DOMWindowUtils.getOMTAStyle(div, 'transform');
-
-    var matrixComponents =
-      transformStr.startsWith('matrix(')
-      ? transformStr.substring('matrix('.length, transformStr.length-1)
-                    .split(',')
-                    .map(component => Number(component))
-      : [];
-    assert_equals(matrixComponents.length, 6,
-                  'Got a valid transform matrix on the compositor'
-                  + ' (got: "' + transformStr + '")');
-
-    // If the delay has been applied correctly we should be at least
-    // half-way through the animation
-    assert_true(matrixComponents[4] >= 50,
-                'Animation is at least half-way through on the compositor'
-                + ' (got translation of ' + matrixComponents[4] + ')');
-    t.done();
-  }));
-}, 'Starting an animation with a delay starts from the correct point');
-
-</script>
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -2610,17 +2610,17 @@ ElementRestyler::Restyle(nsRestyleHint a
   // List of descendant elements of mContent we know we will eventually need to
   // restyle.  Before we return from this function, we call
   // RestyleTracker::AddRestyleRootsIfAwaitingRestyle to ensure they get
   // restyled in RestyleTracker::DoProcessRestyles.
   nsTArray<nsRefPtr<Element>> descendants;
 
   nsRestyleHint hintToRestore = nsRestyleHint(0);
   if (mContent && mContent->IsElement() &&
-      // If we're resolving from the root of the frame tree (which
+      // If we're we're resolving from the root of the frame tree (which
       // we do in DoRebuildAllStyleData), we need to avoid getting the
       // root's restyle data until we get to its primary frame, since
       // it's the primary frame that has the styles for the root element
       // (rather than the ancestors of the primary frame whose mContent
       // is the root node but which have different styles).  If we use
       // up the hint for one of the ancestors that we hit first, then
       // we'll fail to do the restyling we need to do.
       (mContent->GetParent() || mContent->GetPrimaryFrame() == mFrame)) {
@@ -2631,16 +2631,22 @@ ElementRestyler::Restyle(nsRestyleHint a
         mChangeList->AppendChange(mFrame, mContent, restyleData->mChangeHint);
       }
       hintToRestore = restyleData->mRestyleHint;
       aRestyleHint = nsRestyleHint(aRestyleHint | restyleData->mRestyleHint);
       descendants.SwapElements(restyleData->mDescendants);
     }
   }
 
+  // Some changes to animations don't affect the computed style and yet still
+  // require the layer to be updated. For example, pausing an animation via
+  // the Web Animations API won't affect an element's style but still
+  // requires us to pull the animation off the layer.
+  AddLayerChangesForAnimation();
+
   // If we are restyling this frame with eRestyle_Self or weaker hints,
   // we restyle children with nsRestyleHint(0).  But we pass the
   // eRestyle_ChangeAnimationPhaseDescendants and eRestyle_ForceDescendants
   // flags down too.
   nsRestyleHint childRestyleHint =
     nsRestyleHint(aRestyleHint & (eRestyle_Subtree |
                                   eRestyle_ChangeAnimationPhaseDescendants |
                                   eRestyle_ForceDescendants));
@@ -2683,29 +2689,16 @@ ElementRestyler::Restyle(nsRestyleHint a
       // with this frame and its descendants.  Higher RestyleResult values
       // represent a superset of the work done by lower values.
       result = thisResult;
     }
 
     f = GetNextContinuationWithSameStyle(f, oldContext, &haveMoreContinuations);
   }
 
-  // Some changes to animations don't affect the computed style and yet still
-  // require the layer to be updated. For example, pausing an animation via
-  // the Web Animations API won't affect an element's style but still
-  // requires us to pull the animation off the layer.
-  //
-  // Although we only expect this code path to be called when computed style
-  // is not changing, we can sometimes reach this at the end of a transition
-  // when the animated style is being removed. Since
-  // AddLayerChangesForAnimation checks if mFrame has a transform style or not,
-  // we need to call it *after* calling RestyleSelf to ensure the animated
-  // transform has been removed first.
-  AddLayerChangesForAnimation();
-
   if (haveMoreContinuations && hintToRestore) {
     // If we have more continuations with different style (e.g., because
     // we're inside a ::first-letter or ::first-line), put the restyle
     // hint back.
     mRestyleTracker.AddPendingRestyleToTable(mContent->AsElement(),
                                              hintToRestore, nsChangeHint(0));
   }
 
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -535,22 +535,18 @@ nsTransitionManager::ConsiderStartingTra
   AnimationPropertySegment& segment = *prop.mSegments.AppendElement();
   segment.mFromValue = startValue;
   segment.mToValue = endValue;
   segment.mFromKey = 0;
   segment.mToKey = 1;
   segment.mTimingFunction.Init(tf);
 
   nsRefPtr<CSSTransitionPlayer> player = new CSSTransitionPlayer(timeline);
-  // The order of the following two calls is important since PlayFromStyle
-  // will add the player to the PendingPlayerTracker of its source content's
-  // document. When we come to make source writeable (bug 1049975) we should
-  // remove this dependency.
+  player->PlayFromStyle();
   player->SetSource(pt);
-  player->PlayFromStyle();
 
   if (!aElementTransitions) {
     aElementTransitions =
       GetAnimationPlayers(aElement, aNewStyleContext->GetPseudoType(), true);
     if (!aElementTransitions) {
       NS_WARNING("allocating CommonAnimationManager failed");
       return;
     }
--- a/toolkit/devtools/server/actors/animation.js
+++ b/toolkit/devtools/server/actors/animation.js
@@ -173,17 +173,16 @@ let AnimationPlayerActor = ActorClass({
     response: {}
   }),
 
   /**
    * Play the player.
    */
   play: method(function() {
     this.player.play();
-    return this.player.ready;
   }, {
     request: {},
     response: {}
   })
 });
 
 let AnimationPlayerFront = FrontClass(AnimationPlayerActor, {
   AUTO_REFRESH_EVENT: "updated-state",
--- a/toolkit/devtools/server/tests/browser/browser_animation_actors_04.js
+++ b/toolkit/devtools/server/tests/browser/browser_animation_actors_04.js
@@ -33,21 +33,18 @@ function* playStateIsUpdatedDynamically(
   // using the CPOW.
   let cpow = content.document.querySelector(".short-animation");
   cpow.classList.remove("short-animation");
   let reflow = cpow.offsetWidth;
   cpow.classList.add("short-animation");
 
   let [player] = yield front.getAnimationPlayersForNode(node);
 
-  // Bug 1113091 - We should wait for the player to become ready then
-  // test for the "running" state only
-  ok(player.initialState.playState == "running" ||
-     player.initialState.playState == "pending",
-    "The playState is running or pending while the transition is running");
+  is(player.initialState.playState, "running",
+    "The playState is running while the transition is running");
 
   info("Wait until the animation stops (more than 1000ms)");
   yield wait(1500); // Waiting 1.5sec for good measure
 
   let state = yield player.getCurrentState();
   is(state.playState, "finished",
     "The animation has ended and the state has been updated");
   ok(state.currentTime > player.initialState.currentTime,