diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /devtools/client/animationinspector/test/browser_animation_timeline_ui.js | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-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_timeline_ui.js')
-rw-r--r-- | devtools/client/animationinspector/test/browser_animation_timeline_ui.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/devtools/client/animationinspector/test/browser_animation_timeline_ui.js b/devtools/client/animationinspector/test/browser_animation_timeline_ui.js new file mode 100644 index 000000000..43c148482 --- /dev/null +++ b/devtools/client/animationinspector/test/browser_animation_timeline_ui.js @@ -0,0 +1,43 @@ +/* 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); + +// Check that the timeline contains the right elements. + +add_task(function* () { + yield addTab(URL_ROOT + "doc_simple_animation.html"); + let {panel} = yield openAnimationInspector(); + + let timeline = panel.animationsTimelineComponent; + let el = timeline.rootWrapperEl; + + ok(el.querySelector(".time-header"), + "The header element is in the DOM of the timeline"); + ok(el.querySelectorAll(".time-header .header-item").length, + "The header has some time graduations"); + + ok(el.querySelector(".animations"), + "The animations container is in the DOM of the timeline"); + is(el.querySelectorAll(".animations .animation").length, + timeline.animations.length, + "The number of animations displayed matches the number of animations"); + + for (let i = 0; i < timeline.animations.length; i++) { + let animation = timeline.animations[i]; + let animationEl = el.querySelectorAll(".animations .animation")[i]; + + ok(animationEl.querySelector(".target"), + "The animated node target element is in the DOM"); + ok(animationEl.querySelector(".time-block"), + "The timeline element is in the DOM"); + is(animationEl.querySelector(".name").textContent, + animation.state.name, + "The name on the timeline is correct"); + ok(animationEl.querySelector("svg path"), + "The timeline has svg and path element as summary graph"); + } +}); |