diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /devtools/client/inspector/animation/test/browser_animation_current-time-scrubber_each-different-creation-time-animations.js | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | devtools/client/inspector/animation/test/browser_animation_current-time-scrubber_each-different-creation-time-animations.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/devtools/client/inspector/animation/test/browser_animation_current-time-scrubber_each-different-creation-time-animations.js b/devtools/client/inspector/animation/test/browser_animation_current-time-scrubber_each-different-creation-time-animations.js new file mode 100644 index 0000000000..85373b3295 --- /dev/null +++ b/devtools/client/inspector/animation/test/browser_animation_current-time-scrubber_each-different-creation-time-animations.js @@ -0,0 +1,34 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Test whether proper currentTime was set for each animations. + +const WAIT_TIME = 3000; + +add_task(async function () { + await addTab(URL_ROOT + "doc_simple_animation.html"); + await removeAnimatedElementsExcept([".animated", ".still"]); + const { animationInspector, panel } = await openAnimationInspector(); + + info( + "Add an animation to make a situation which has different creation time" + ); + await wait(WAIT_TIME); + await setClassAttribute(animationInspector, ".still", "ball compositor-all"); + await waitUntil(() => panel.querySelectorAll(".animation-item").length === 2); + + info("Move the scrubber"); + clickOnCurrentTimeScrubberController(animationInspector, panel, 0.5); + await waitUntilAnimationsPlayState(animationInspector, "paused"); + + info("Check existed animations have different currentTime"); + const animations = animationInspector.state.animations; + ok( + animations[0].state.currentTime + WAIT_TIME > + animations[1].state.currentTime, + `The currentTime of added animation shold be ${WAIT_TIME}ms less than ` + + "at least that currentTime of first animation" + ); +}); |