Bug 1416966 - Add todo for checking the final restyle after Animation.finished. r?birtles
If Animation.finished promise was fulfilled in Animation::Tick, at the moment we
haven't yet restyled the final animation value. So once we have new micro task
checkpoint there we can observe a restyle marker after Animation.finished was
fulfilled.
MozReview-Commit-ID: LiEl4Iu2Cbr
--- a/dom/animation/test/mozilla/file_restyles.html
+++ b/dom/animation/test/mozilla/file_restyles.html
@@ -249,52 +249,60 @@ waitForAllPaints(() => {
var div = addDiv(null, { style: 'transition: opacity 1ms; opacity: 0' });
getComputedStyle(div).opacity;
div.style.opacity = 1;
var animation = div.getAnimations()[0];
var initialRect = div.getBoundingClientRect();
await animation.finished;
+ var markers = await observeStyling(1);
+ todo_is(markers.length, 1,
+ 'Finished transitions should restyle once after ' +
+ 'Animation.finished was fulfilled');
var mouseX = initialRect.left + initialRect.width / 2;
var mouseY = initialRect.top + initialRect.height / 2;
- var markers = await observeStyling(5, () => {
+ markers = await observeStyling(5, () => {
// We can't use synthesizeMouse here since synthesizeMouse causes
// layout flush.
synthesizeMouseAtPoint(mouseX++, mouseY++,
{ type: 'mousemove' }, window);
});
is(markers.length, 0,
- 'Bug 1219236: Finished transitions should never cause restyles ' +
- 'when mouse is moved on the animations');
+ 'Finished transitions should never cause restyles when mouse is moved ' +
+ 'on the transitions');
await ensureElementRemoval(div);
});
add_task(async function no_restyling_mouse_movement_on_finished_animation() {
var div = addDiv(null, { style: 'animation: opacity 1ms' });
var animation = div.getAnimations()[0];
var initialRect = div.getBoundingClientRect();
await animation.finished;
+ var markers = await observeStyling(1);
+ todo_is(markers.length, 1,
+ 'Finished animations should restyle once after ' +
+ 'Animation.finished was fulfilled');
var mouseX = initialRect.left + initialRect.width / 2;
var mouseY = initialRect.top + initialRect.height / 2;
- var markers = await observeStyling(5, () => {
+ markers = await observeStyling(5, () => {
// We can't use synthesizeMouse here since synthesizeMouse causes
// layout flush.
synthesizeMouseAtPoint(mouseX++, mouseY++,
{ type: 'mousemove' }, window);
});
is(markers.length, 0,
- 'Bug 1219236: Finished animations should never cause restyles ' +
- 'when mouse is moved on the animations');
+ 'Finished animations should never cause restyles when mouse is moved ' +
+ 'on the animations');
await ensureElementRemoval(div);
});
add_task_if_omta_enabled(async function no_restyling_compositor_animations_out_of_view_element() {
if (!offscreenThrottlingEnabled) {
return;
}