Bug 1524480 - Trigger transitions in test_missing-keyframe-on-compositor.html; r=hiro

test_missing-keyframe-on-compositor.html assumes that calling Element.animate()
will flush style and trigger transitions. However, in this patch series we will
make Element.animate() stop flushing style (and the spec will also mandate
this). Once we do that, the expected transitions will no longer fire and this
test will fail. This patch updates the test to explicitly trigger transitions
before calling Element.animate().

Differential Revision: https://phabricator.services.mozilla.com/D18915

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brian Birtles 2019-02-15 06:08:07 +00:00
Родитель 3e2c609d02
Коммит 2b4763db9f
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -76,6 +76,8 @@ promise_test(t => {
getComputedStyle(div).opacity;
div.style.opacity = '0.5';
getComputedStyle(div).opacity;
div.animate({ opacity: 1 }, 100 * MS_PER_SEC);
return waitForPaintsFlushed();
@ -134,6 +136,8 @@ promise_test(t => {
getComputedStyle(div).opacity;
div.style.opacity = '0.5';
getComputedStyle(div).opacity;
div.animate([{ offset: 0, opacity: 1 }], 100 * MS_PER_SEC);
return waitForPaintsFlushed();
@ -274,6 +278,8 @@ promise_test(t => {
getComputedStyle(div).transform;
div.style.transform = 'translateX(200px)';
getComputedStyle(div).transform;
div.animate({ transform: 'translateX(400px)' }, 100 * MS_PER_SEC);
return waitForPaintsFlushed();
@ -334,6 +340,8 @@ promise_test(t => {
getComputedStyle(div).transform;
div.style.transform = 'translateX(200px)';
getComputedStyle(div).transform;
div.animate([{ offset: 0, transform: 'translateX(300px)' }],
100 * MS_PER_SEC);