author | Daisuke Akatsuka <dakatsuka@mozilla.com> |
Tue, 29 May 2018 10:09:44 +0900 | |
changeset 420178 | 97aee105338e761c5179cb943b60d5c15ba40f97 |
parent 420177 | 9353259c9adfd54bdfb6859f9e8a5f186eb7c3e1 |
child 420179 | 02f1c16d83afc65364a01b61a3f500b5ce390c38 |
push id | 34066 |
push user | shindli@mozilla.com |
push date | Tue, 29 May 2018 09:51:43 +0000 |
treeherder | mozilla-central@4342f8a66345 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | pbro |
bugs | 1464396 |
milestone | 62.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/devtools/client/inspector/animation/test/browser.ini +++ b/devtools/client/inspector/animation/test/browser.ini @@ -38,16 +38,17 @@ support-files = [browser_animation_inspector_exists.js] [browser_animation_keyframes-graph_computed-value-path.js] [browser_animation_keyframes-graph_computed-value-path_easing-hint.js] [browser_animation_keyframes-graph_keyframe-marker.js] [browser_animation_keyframes-progress-bar.js] [browser_animation_keyframes-progress-bar_after-resuming.js] [browser_animation_logic_auto-stop.js] [browser_animation_logic_avoid-updating-during-hiding.js] +[browser_animation_logic_created-time.js] [browser_animation_logic_mutations.js] [browser_animation_logic_mutations_fast.js] [browser_animation_pause-resume-button.js] [browser_animation_pause-resume-button_end-time.js] [browser_animation_pause-resume-button_respectively.js] [browser_animation_pause-resume-button_spacebar.js] [browser_animation_playback-rate-selector.js] [browser_animation_pseudo-element.js]
new file mode 100644 --- /dev/null +++ b/devtools/client/inspector/animation/test/browser_animation_logic_created-time.js @@ -0,0 +1,33 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Test whether the created time of animation unchanged even if change node. + +add_task(async function() { + await addTab(URL_ROOT + "doc_custom_playback_rate.html"); + const { animationInspector, inspector } = await openAnimationInspector(); + + info("Check both the created time of animation are same"); + const baseCreatedTime = animationInspector.state.animations[0].state.createdTime; + is(animationInspector.state.animations[1].state.createdTime, baseCreatedTime, + "Both created time of animations should be same"); + + info("Check created time after selecting '.div1'"); + await selectNodeAndWaitForAnimations(".div1", inspector); + is(animationInspector.state.animations[0].state.createdTime, baseCreatedTime, + "The created time of animation on element of .div1 should unchanged"); + + info("Check created time after selecting '.div2'"); + await selectNodeAndWaitForAnimations(".div2", inspector); + is(animationInspector.state.animations[0].state.createdTime, baseCreatedTime, + "The created time of animation on element of .div2 should unchanged"); + + info("Check created time after selecting 'body' again"); + await selectNodeAndWaitForAnimations("body", inspector); + is(animationInspector.state.animations[0].state.createdTime, baseCreatedTime, + "The created time of animation[0] should unchanged"); + is(animationInspector.state.animations[1].state.createdTime, baseCreatedTime, + "The created time of animation[1] should unchanged"); +});
--- a/devtools/client/inspector/animation/test/doc_custom_playback_rate.html +++ b/devtools/client/inspector/animation/test/doc_custom_playback_rate.html @@ -10,20 +10,21 @@ </style> </head> <body> <script> "use strict"; const duration = 100000; - function createAnimation() { + function createAnimation(cls) { const div = document.createElement("div"); + div.classList.add(cls); document.body.appendChild(div); const animation = div.animate([{ opacity: 0 }], duration); animation.playbackRate = 1.5; } - createAnimation(); - createAnimation(); + createAnimation("div1"); + createAnimation("div2"); </script> </body> </html>