Bug 1466031 - Update test_setting-effect.html; r?hiro draft
authorBrian Birtles <birtles@gmail.com>
Mon, 04 Jun 2018 10:10:41 +0900
changeset 803429 b78917d6d55d5a42089b804ca898e3cef1a66976
parent 803428 f4cb303433a821efacb409ff41b59884126a87f6
child 803430 ee0c0efd6a001ca11c29b83fa0ed8d6d0459a28b
push id112095
push userbmo:bbirtles@mozilla.com
push dateMon, 04 Jun 2018 01:13:47 +0000
reviewershiro
bugs1466031
milestone62.0a1
Bug 1466031 - Update test_setting-effect.html; r?hiro Apart from whitespace / test description tests this patch also drops an assertion about the animation playState since it seems unrelated to the purpose of that particular test. MozReview-Commit-ID: DS12buxWXPm
dom/animation/test/css-animations/test_setting-effect.html
--- a/dom/animation/test/css-animations/test_setting-effect.html
+++ b/dom/animation/test/css-animations/test_setting-effect.html
@@ -1,23 +1,23 @@
 <!doctype html>
 <meta charset=utf-8>
 <title>CSSAnimation.effect</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src='../testcommon.js'></script>
 <style>
-  @keyframes anim {
-    from {
-      margin-left: 0px;
-    }
-    to {
-      margin-left: 100px;
-    }
+@keyframes anim {
+  from {
+    margin-left: 0px;
   }
+  to {
+    margin-left: 100px;
+  }
+}
 </style>
 <body>
 <div id="log"></div>
 <script>
 'use strict';
 
 promise_test(async t => {
   const div = addDiv(t);
@@ -41,17 +41,16 @@ promise_test(async t => {
 
   const animation = div.getAnimations()[0];
   await animation.ready;
 
   animation.currentTime = 50 * MS_PER_SEC;
   animation.effect = new KeyframeEffect(div,
                                         { left: [ '0px' , '100px'] },
                                         100 * MS_PER_SEC);
-  assert_equals(animation.playState, 'running');
   assert_equals(getComputedStyle(div).marginLeft, '0px');
   assert_equals(getComputedStyle(div).left, '50px');
 }, 'Replacing an animation\'s effect with an effect that targets a different ' +
    'property should update both properties');
 
 promise_test(async t => {
   const div = addDiv(t);
   div.style.animation = 'anim 100s';
@@ -101,18 +100,18 @@ promise_test(async t => {
                                         100 * MS_PER_SEC);
 
   await watcher1.wait_for('animationstart');
 
   assert_equals(animation.effect.target, div2);
 
   // Then wait a couple of frames and check that no event was dispatched.
   await waitForAnimationFrames(2);
-}, 'The event is dispatched at the original element even after setting an ' +
-   'effect with a different target element');
+}, 'CSS animation events are dispatched at the original element even after'
+   + ' setting an effect with a different target element');
 
 promise_test(async t => {
   const div = addDiv(t);
   const watcher = new EventWatcher(t, div, [ 'animationstart',
                                              'animationend',
                                              'animationcancel' ]);
   div.style.animation = 'anim 100s';
   const animation = div.getAnimations()[0];