Bug 1524480 - Trigger transitions in test_missing-keyframe-on-compositor.html; r=hiro
authorBrian Birtles <birtles@gmail.com>
Fri, 15 Feb 2019 06:08:07 +0000
changeset 459525 d56add557dc112314810b987126b397844140dd2
parent 459524 c8b3e45cd0313144925f44c10bfd47d430ee2b26
child 459526 7973b5c9dccfd327b5de143dc1bc275c59308fa4
push id111964
push usercsabou@mozilla.com
push dateFri, 15 Feb 2019 18:54:44 +0000
treeherdermozilla-inbound@db3c4f905082 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1524480
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
dom/animation/test/style/test_missing-keyframe-on-compositor.html
--- a/dom/animation/test/style/test_missing-keyframe-on-compositor.html
+++ b/dom/animation/test/style/test_missing-keyframe-on-compositor.html
@@ -71,16 +71,18 @@ promise_test(t => {
 
 promise_test(t => {
   var div;
   return useTestRefreshMode(t).then(() => {
     div = addDiv(t, { style: 'opacity: 0.1; transition: opacity 100s linear' });
     getComputedStyle(div).opacity;
 
     div.style.opacity = '0.5';
+    getComputedStyle(div).opacity;
+
     div.animate({ opacity: 1 }, 100 * MS_PER_SEC);
 
     return waitForPaintsFlushed();
   }).then(() => {
     var opacity =
       SpecialPowers.DOMWindowUtils.getOMTAStyle(div, 'opacity');
     assert_equals(opacity, '0.1',
                   'The initial opacity value should be the initial value of ' +
@@ -129,16 +131,18 @@ promise_test(t => {
 
 promise_test(t => {
   var div;
   return useTestRefreshMode(t).then(() => {
     div = addDiv(t, { style: 'opacity: 0; transition: opacity 100s linear' });
     getComputedStyle(div).opacity;
 
     div.style.opacity = '0.5';
+    getComputedStyle(div).opacity;
+
     div.animate([{ offset: 0, opacity: 1 }], 100 * MS_PER_SEC);
 
     return waitForPaintsFlushed();
   }).then(() => {
     SpecialPowers.DOMWindowUtils.advanceTimeAndRefresh(50 * MS_PER_SEC);
 
     var opacity =
       SpecialPowers.DOMWindowUtils.getOMTAStyle(div, 'opacity');
@@ -269,16 +273,18 @@ promise_test(t => {
 promise_test(t => {
   var div;
   return useTestRefreshMode(t).then(() => {
     div = addDiv(t, { style: 'transform: translateX(100px);' +
                              'transition: transform 100s linear' });
     getComputedStyle(div).transform;
 
     div.style.transform = 'translateX(200px)';
+    getComputedStyle(div).transform;
+
     div.animate({ transform: 'translateX(400px)' }, 100 * MS_PER_SEC);
 
     return waitForPaintsFlushed();
   }).then(() => {
     var transform =
       SpecialPowers.DOMWindowUtils.getOMTAStyle(div, 'transform');
     assert_matrix_equals(transform, 'matrix(1, 0, 0, 1, 100, 0)',
       'The initial transform value should be the initial value of the ' +
@@ -329,16 +335,18 @@ promise_test(t => {
 promise_test(t => {
   var div;
   return useTestRefreshMode(t).then(() => {
     div = addDiv(t, { style: 'transform: translateX(100px);' +
                              'transition: transform 100s linear' });
     getComputedStyle(div).transform;
 
     div.style.transform = 'translateX(200px)';
+    getComputedStyle(div).transform;
+
     div.animate([{ offset: 0, transform: 'translateX(300px)' }],
                 100 * MS_PER_SEC);
 
     return waitForPaintsFlushed();
   }).then(() => {
     SpecialPowers.DOMWindowUtils.advanceTimeAndRefresh(50 * MS_PER_SEC);
 
     var transform =