Bug 1242872 - Part 9: Should not assume any order of animations in MurationObserver. r=pbrosset
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Fri, 19 Feb 2016 16:43:08 +0900
changeset 321846 b274118f154c3e4b743443e66c96556824e40247
parent 321845 fe65342f14bc086b9e4dbf122418c568fd4a3ff3
child 321847 14163554db509ebc3ad5735c83392849d2b8ee88
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbrosset
bugs1242872
milestone47.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 1242872 - Part 9: Should not assume any order of animations in MurationObserver. r=pbrosset After patch 7, the order of animations in MutationObserver has been reversed. When we want to use the animations ordering by something, we need to sort it first. MozReview-Commit-ID: 7xOYNsuSbvA
devtools/server/tests/browser/browser_animation_emitMutations.js
--- a/devtools/server/tests/browser/browser_animation_emitMutations.js
+++ b/devtools/server/tests/browser/browser_animation_emitMutations.js
@@ -25,20 +25,20 @@ add_task(function*() {
   yield node.modifyAttributes([
     {attributeName: "class", newValue: "multiple-animations"}
   ]);
   let changes = yield onMutations;
 
   ok(true, "The mutations event was emitted");
   is(changes.length, 2, "There are 2 changes in the mutation event");
   ok(changes.every(({type}) => type === "added"), "Both changes are additions");
-  is(changes[0].player.initialState.name, "move",
-    "The first added animation is 'move'");
-  is(changes[1].player.initialState.name, "glow",
-    "The first added animation is 'glow'");
+
+  let names = changes.map(c => c.player.initialState.name).sort();
+  is(names[0], "glow", "The animation 'glow' was added");
+  is(names[1], "move", "The animation 'move' was added");
 
   info("Store the 2 new players for comparing later");
   let p1 = changes[0].player;
   let p2 = changes[1].player;
 
   info("Listen for removed animations");
   onMutations = once(animations, "mutations");