Bug 1413817 - Tweak only_one_restyling_after_finish_is_called depending on the conformant Promise handling. r?birtles
I did intentionally use is() for
bug 1415457 instead of todo_is() since we will
not notice if we got 3 or more restyles there.
MozReview-Commit-ID: 1uuP362I6o4
--- a/dom/animation/test/mozilla/file_restyles.html
+++ b/dom/animation/test/mozilla/file_restyles.html
@@ -218,19 +218,27 @@ waitForAllPaints(() => {
var animation = div.getAnimations()[0];
await waitForPaintsAndFrame();
ok(SpecialPowers.wrap(animation).isRunningOnCompositor);
animation.finish();
var markers = await observeStyling(5);
- is(markers.length, 1,
- 'Animations running on the compositor should only update style ' +
- 'once after finish() is called');
+ if (hasConformantPromiseHandling) {
+ // FIXME: Bug 1415457: We should avoid a redundant restyling request
+ // for finished CSS animation by calling finish().
+ is(markers.length, 2,
+ 'Animations running on the compositor should only update style ' +
+ 'once after finish() is called');
+ } else {
+ is(markers.length, 1,
+ 'Animations running on the compositor should only update style ' +
+ 'once after finish() is called');
+ }
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;