summaryrefslogtreecommitdiffstats
path: root/devtools/client/animationinspector/test/browser_animation_toolbar_exists.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_toolbar_exists.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_toolbar_exists.js')
-rw-r--r--devtools/client/animationinspector/test/browser_animation_toolbar_exists.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/devtools/client/animationinspector/test/browser_animation_toolbar_exists.js b/devtools/client/animationinspector/test/browser_animation_toolbar_exists.js
new file mode 100644
index 000000000..aa8b69e02
--- /dev/null
+++ b/devtools/client/animationinspector/test/browser_animation_toolbar_exists.js
@@ -0,0 +1,36 @@
+/* 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";
+
+requestLongerTimeout(2);
+
+// Test that the animation panel has a top toolbar that contains the play/pause
+// button and that is displayed at all times.
+// Also test that this toolbar gets replaced by the timeline toolbar when there
+// are animations to be displayed.
+
+add_task(function* () {
+ yield addTab(URL_ROOT + "doc_simple_animation.html");
+ let {inspector, window} = yield openAnimationInspector();
+ let doc = window.document;
+ let toolbar = doc.querySelector("#global-toolbar");
+
+ ok(toolbar, "The panel contains the toolbar element with the new UI");
+ ok(!isNodeVisible(toolbar),
+ "The toolbar is hidden while there are animations");
+
+ let timelineToolbar = doc.querySelector("#timeline-toolbar");
+ ok(timelineToolbar, "The panel contains a timeline toolbar element");
+ ok(isNodeVisible(timelineToolbar),
+ "The timeline toolbar is visible when there are animations");
+
+ info("Select a node that has no animations");
+ yield selectNodeAndWaitForAnimations(".still", inspector);
+
+ ok(isNodeVisible(toolbar),
+ "The toolbar is shown when there are no animations");
+ ok(!isNodeVisible(timelineToolbar),
+ "The timeline toolbar is hidden when there are no animations");
+});