Bug 1235723 - Part 2: Check that the short animation is surely finished before proceeding test. r?pbrosset
MozReview-Commit-ID: FJS8HaWPgSe
--- a/devtools/server/tests/browser/browser_animation_keepFinished.js
+++ b/devtools/server/tests/browser/browser_animation_keepFinished.js
@@ -30,16 +30,19 @@ add_task(function*() {
info("Add a short animation on the node");
yield node.modifyAttributes([
{attributeName: "class", newValue: "short-animation"}
]);
info("Wait for longer than the animation's duration");
yield wait(2000);
+ players = yield animations.getAnimationPlayersForNode(node);
+ is(players.length, 0, "The added animation is surely finished");
+
is(reportedMutations.length, 1, "Only one mutation was reported");
is(reportedMutations[0].type, "added", "The mutation was an addition");
animations.off("mutations", onMutations);
yield closeDebuggerClient(client);
gBrowser.removeCurrentTab();
});