Bug 1416966 - Add an annotation for a test case that will fail once we perform a micro task checkpoint between Animation::Tick and requestAnimationFrame callbacks. r?birtles
The 'is' check there will be replaced 'todo_is' after the commit for the new
micro task checkpoint.
MozReview-Commit-ID: EGFZWy8BD3O
--- a/dom/animation/test/mozilla/file_restyles.html
+++ b/dom/animation/test/mozilla/file_restyles.html
@@ -233,20 +233,30 @@ waitForAllPaints(() => {
var div = addDiv(null, { style: 'animation: opacity 100s' });
var animation = div.getAnimations()[0];
await animation.ready;
ok(SpecialPowers.wrap(animation).isRunningOnCompositor);
animation.finish();
- var markers = await observeStyling(5);
+ var markers = await observeStyling(1);
+ // FIXME: Once we perform a micro task checkpoint between animation tick
+ // and requestAnimationFrame callback and we have the conformant Promise
+ // handling, we will see two restyle markers in two different frames
+ // for the finish() due to bug 1415457.
is(markers.length, 1,
- 'Animations running on the compositor should only update style ' +
- 'once after finish() is called');
+ 'Bug 1415457: Animations running on the compositor should only ' +
+ 'update style once after finish() is called');
+
+ markers = await observeStyling(5);
+ is(markers.length, 0,
+ 'Finished animations should never update style after one ' +
+ 'restyle happened for finish()');
+
await ensureElementRemoval(div);
});
add_task(async function no_restyling_mouse_movement_on_finished_transition() {
var div = addDiv(null, { style: 'transition: opacity 1ms; opacity: 0' });
getComputedStyle(div).opacity;
div.style.opacity = 1;