Bug 1416966 - Add todo for checking one restyle after Animation.pause(). r?birtles
Similar to the previous commit, if Animation.pause() is called between
restyling process and the next refresh driver's tick and if we wait for
Animation.ready after the pause(), there should be one restyle that hasn't
yet processed.
MozReview-Commit-ID: JnpwhOuDvPz
--- a/dom/animation/test/mozilla/file_restyles.html
+++ b/dom/animation/test/mozilla/file_restyles.html
@@ -612,37 +612,47 @@ waitForAllPaints(() => {
await animation.ready;
ok(SpecialPowers.wrap(animation).isRunningOnCompositor);
animation.pause();
await animation.ready;
- var markers = await observeStyling(5);
+ var markers = await observeStyling(1);
+ todo_is(markers.length, 1,
+ 'Animations running on the compositor should restyle once after ' +
+ 'Animation.pause() was called');
+
+ markers = await observeStyling(5);
is(markers.length, 0,
- 'Bug 1232563: Paused animations running on the compositor should ' +
- 'never cause restyles once after pause() is called');
+ 'Paused animations running on the compositor should never cause ' +
+ 'restyles');
await ensureElementRemoval(div);
});
add_task(async function no_restyling_main_thread_animations_after_pause_is_called() {
var div = addDiv(null, { style: 'animation: background-color 100s' });
var animation = div.getAnimations()[0];
await animation.ready;
animation.pause();
await animation.ready;
- var markers = await observeStyling(5);
+ var markers = await observeStyling(1);
+ todo_is(markers.length, 1,
+ 'Animations running on the main-thread should restyle once after ' +
+ 'Animation.pause() was called');
+
+ markers = await observeStyling(5);
is(markers.length, 0,
- 'Bug 1232563: Paused animations running on the main-thread should ' +
- 'never cause restyles after pause() is called');
+ 'Paused animations running on the main-thread should never cause ' +
+ 'restyles');
await ensureElementRemoval(div);
});
add_task_if_omta_enabled(async function only_one_restyling_when_current_time_is_set_to_middle_of_duration() {
var div = addDiv(null, { style: 'animation: opacity 100s' });
var animation = div.getAnimations()[0];
await animation.ready;