Bug 1467344 - Fix some minor formatting in test_animation-computed-timing.html; r=hiro
authorBrian Birtles <birtles@gmail.com>
Thu, 16 Aug 2018 14:41:02 +0900
changeset 487355 242d779840719472bea5adcd114d2a1bdb08eb96
parent 487354 14200486590f8f2e121c74ded7986dccd12ff5ef
child 487356 c5722de174bc37cfd768e62366da5acc22298969
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1467344
milestone63.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 1467344 - Fix some minor formatting in test_animation-computed-timing.html; r=hiro
dom/animation/test/css-transitions/test_animation-computed-timing.html
--- a/dom/animation/test/css-transitions/test_animation-computed-timing.html
+++ b/dom/animation/test/css-transitions/test_animation-computed-timing.html
@@ -11,173 +11,172 @@
 }
 
 </style>
 <div id="log"></div>
 <script>
 
 'use strict';
 
+
 // --------------------
 // delay
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
-  assert_equals(effect.getComputedTiming().delay, 0,
-                'Initial value of delay');
+  assert_equals(effect.getComputedTiming().delay, 0, 'Initial value of delay');
 }, 'delay of a new tranisition');
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10s 10s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().delay, 10000,
                 'Initial value of delay');
 }, 'Positive delay of a new transition');
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10s -5s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().delay, -5000,
                 'Initial value of delay');
 }, 'Negative delay of a new transition');
 
 
 // --------------------
 // endDelay
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().endDelay, 0,
                 'Initial value of endDelay');
 }, 'endDelay of a new transition');
 
 
 // --------------------
 // fill
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
-  assert_equals(effect.getComputedTiming().fill, 'backwards',
-                'Fill backwards');
+  assert_equals(effect.getComputedTiming().fill, 'backwards', 'Fill backwards');
 }, 'fill of a new transition');
 
 
 // --------------------
 // iterationStart
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().iterationStart, 0,
                 'Initial value of iterationStart');
 }, 'iterationStart of a new transition');
 
 
 // --------------------
 // iterations
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().iterations, 1,
                 'Initial value of iterations');
 }, 'iterations of a new transition');
 
 
 // --------------------
 // duration
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().duration, 10000,
                 'Initial value of duration');
 }, 'duration of a new transition');
 
 
 // --------------------
 // direction
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class : 'animated-div' });
   div.style.transition = 'margin-left 10s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().direction, 'normal',
                 'Initial value of direction');
 }, 'direction of a new transition');
 
 
 // --------------------
 // easing
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().easing, 'linear',
                 'Initial value of easing');
 }, 'easing of a new transition');
 
 
 // ------------------------------
 // endTime
 // = max(start delay + active duration + end delay, 0)
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 100s -5s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   const answer = 100000 - 5000; // ms
   assert_equals(effect.getComputedTiming().endTime, answer,
                 'Initial value of endTime');
@@ -185,56 +184,56 @@ test(t => {
 
 
 // --------------------
 // activeDuration
 // = iteration duration * iteration count(==1)
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 100s -5s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().activeDuration, 100000,
                 'Initial value of activeDuration');
 }, 'activeDuration of a new transition');
 
 
 // --------------------
 // localTime
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 100s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().localTime, 0,
                 'Initial value of localTime');
 }, 'localTime of a new transition');
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 100s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const anim = div.getAnimations()[0];
   anim.currentTime = 5000;
   assert_equals(anim.effect.getComputedTiming().localTime, anim.currentTime,
                 'current localTime after setting currentTime');
 }, 'localTime is always equal to currentTime');
 
 promise_test(async t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 100s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const anim = div.getAnimations()[0];
   anim.playbackRate = 2; // 2 times faster
 
   await anim.ready;
@@ -248,78 +247,78 @@ promise_test(async t => {
 }, 'localTime reflects playbackRate immediately');
 
 
 // --------------------
 // progress
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10.5s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().progress, 0.0,
                 'Initial value of progress');
 }, 'progress of a new transition');
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10.5s 2s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().progress, 0.0,
                 'Initial value of progress');
 }, 'progress of a new transition with positive delay in before phase');
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10.5s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const anim = div.getAnimations()[0];
-  anim.finish()
+  anim.finish();
   assert_equals(anim.effect.getComputedTiming().progress, null,
                 'finished progress');
 }, 'progress of a finished transition');
 
 
 // --------------------
 // currentIteration
 // --------------------
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().currentIteration, 0,
                 'Initial value of currentIteration');
 }, 'currentIteration of a new transition');
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10s 2s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const effect = div.getAnimations()[0].effect;
   assert_equals(effect.getComputedTiming().currentIteration, 0,
                 'Initial value of currentIteration');
 }, 'currentIteration of a new transition with positive delay in before phase');
 
 test(t => {
-  const div = addDiv(t, {'class': 'animated-div'});
+  const div = addDiv(t, { class: 'animated-div' });
   div.style.transition = 'margin-left 10s';
   flushComputedStyle(div);
   div.style.marginLeft = '10px';
 
   const anim = div.getAnimations()[0];
   anim.finish();
   assert_equals(anim.effect.getComputedTiming().currentIteration, null,
                 'finished currentIteration');