Bug 1438755 - Part 4: Add unit test for different time scales of ComputedTimingPath component. r?gl
MozReview-Commit-ID: 8FnGLXCeSkH
--- a/devtools/client/inspector/animation/test/browser.ini
+++ b/devtools/client/inspector/animation/test/browser.ini
@@ -34,14 +34,15 @@ support-files =
[browser_animation_logic_auto-stop.js]
[browser_animation_pause-resume-button.js]
[browser_animation_pause-resume-button_spacebar.js]
[browser_animation_playback-rate-selector.js]
[browser_animation_rewind-button.js]
[browser_animation_summary-graph_animation-name.js]
[browser_animation_summary-graph_compositor.js]
[browser_animation_summary-graph_computed-timing-path.js]
+[browser_animation_summary-graph_computed-timing-path_different-timescale.js]
[browser_animation_summary-graph_delay-sign.js]
[browser_animation_summary-graph_end-delay-sign.js]
[browser_animation_summary-graph_effect-timing-path.js]
[browser_animation_summary-graph_negative-delay-path.js]
[browser_animation_summary-graph_negative-end-delay-path.js]
[browser_animation_summary-graph_tooltip.js]
new file mode 100644
--- /dev/null
+++ b/devtools/client/inspector/animation/test/browser_animation_summary-graph_computed-timing-path_different-timescale.js
@@ -0,0 +1,23 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test the Computed Timing Path component for different time scales.
+
+add_task(async function() {
+ await addTab(URL_ROOT + "doc_simple_animation.html");
+ const { inspector, panel } = await openAnimationInspector();
+
+ info("Checking the path for different time scale");
+ await selectNodeAndWaitForAnimations(".no-compositor", inspector);
+ const pathStringA = panel.querySelector(".animation-iteration-path").getAttribute("d");
+
+ info("Select animation which has different time scale from no-compositor");
+ await selectNodeAndWaitForAnimations(".endDelayed", inspector);
+
+ info("Select no-compositor again");
+ await selectNodeAndWaitForAnimations(".no-compositor", inspector);
+ const pathStringB = panel.querySelector(".animation-iteration-path").getAttribute("d");
+ is(pathStringA, pathStringB, "Path string should be same even change the time scale");
+});