зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1456828 - Part 4: Add a test that whether the scroll amount change. r=gl
MozReview-Commit-ID: AKC950dTv1g --HG-- extra : rebase_source : f5a5a9bf50cd9f8b3facaf54c6cdac191811e791
This commit is contained in:
Родитель
a66d570b05
Коммит
067a51bced
|
@ -48,6 +48,7 @@ skip-if = (verify && !debug)
|
|||
[browser_animation_logic_created-time.js]
|
||||
[browser_animation_logic_mutations.js]
|
||||
[browser_animation_logic_mutations_fast.js]
|
||||
[browser_animation_logic_scroll-amount.js]
|
||||
[browser_animation_pause-resume-button.js]
|
||||
[browser_animation_pause-resume-button_end-time.js]
|
||||
[browser_animation_pause-resume-button_respectively.js]
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Test whether the scroll amount of animation and animated property re-calculate after
|
||||
// changing selected node.
|
||||
|
||||
add_task(async function() {
|
||||
await addTab(URL_ROOT + "doc_simple_animation.html");
|
||||
await removeAnimatedElementsExcept(
|
||||
[".animated", ".multi", ".longhand", ".negative-delay"]);
|
||||
const { animationInspector, inspector, panel } = await openAnimationInspector();
|
||||
|
||||
info("Set the scroll amount of animation and animated property to the bottom");
|
||||
await clickOnAnimationByTargetSelector(animationInspector, panel, ".longhand");
|
||||
const bottomAnimationEl =
|
||||
panel.querySelector(".animation-item:last-child");
|
||||
const bottomAnimatedPropertyEl =
|
||||
panel.querySelector(".animated-property-item:last-child");
|
||||
bottomAnimationEl.scrollIntoView(false);
|
||||
bottomAnimatedPropertyEl.scrollIntoView(false);
|
||||
|
||||
info("Hold the scroll amount");
|
||||
const animationInspectionPanel =
|
||||
bottomAnimationEl.closest(".progress-inspection-panel");
|
||||
const animatedPropertyInspectionPanel =
|
||||
bottomAnimatedPropertyEl.closest(".progress-inspection-panel");
|
||||
const initialScrollTopOfAnimation = animationInspectionPanel.scrollTop;
|
||||
const initialScrollTopOfAnimatedProperty = animatedPropertyInspectionPanel.scrollTop;
|
||||
|
||||
info("Check whether the scroll amount re-calculate after changing the count of items");
|
||||
await selectNodeAndWaitForAnimations(".negative-delay", inspector);
|
||||
ok(initialScrollTopOfAnimation > animationInspectionPanel.scrollTop,
|
||||
"Scroll amount for animation list should be less than previous state");
|
||||
ok(initialScrollTopOfAnimatedProperty > animatedPropertyInspectionPanel.scrollTop,
|
||||
"Scroll amount for animated property list should be less than previous state");
|
||||
});
|
Загрузка…
Ссылка в новой задаче