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
This commit is contained in:
Hiroyuki Ikezoe 2016-02-19 16:43:08 +09:00
parent 8f7f1cc1b7
commit bffa02a965

View File

@ -30,10 +30,10 @@ add_task(function*() {
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;