summaryrefslogtreecommitdiffstats
path: root/devtools/client/animationinspector/test/browser_animation_mutations_with_same_names.js
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /devtools/client/animationinspector/test/browser_animation_mutations_with_same_names.js
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'devtools/client/animationinspector/test/browser_animation_mutations_with_same_names.js')
-rw-r--r--devtools/client/animationinspector/test/browser_animation_mutations_with_same_names.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/devtools/client/animationinspector/test/browser_animation_mutations_with_same_names.js b/devtools/client/animationinspector/test/browser_animation_mutations_with_same_names.js
new file mode 100644
index 000000000..1ae19c277
--- /dev/null
+++ b/devtools/client/animationinspector/test/browser_animation_mutations_with_same_names.js
@@ -0,0 +1,31 @@
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Check that when animations are added later (through animation mutations) and
+// if these animations have the same names, then all of them are still being
+// displayed (which should be true as long as these animations apply to
+// different nodes).
+
+add_task(function* () {
+ yield addTab(URL_ROOT + "doc_negative_animation.html");
+ let {controller, panel} = yield openAnimationInspector();
+
+ info("Wait until all animations have been added " +
+ "(they're added with setTimeout)");
+ while (controller.animationPlayers.length < 3) {
+ yield controller.once(controller.PLAYERS_UPDATED_EVENT);
+ }
+ yield waitForAllAnimationTargets(panel);
+
+ is(panel.animationsTimelineComponent.animations.length, 3,
+ "The timeline shows 3 animations too");
+
+ // Reduce the known nodeFronts to a set to make them unique.
+ let nodeFronts = new Set(panel.animationsTimelineComponent
+ .targetNodes.map(n => n.previewer.nodeFront));
+ is(nodeFronts.size, 3,
+ "The animations are applied to 3 different node fronts");
+});