Bug 1466031 - Update test_setting-effect.html; r=hiro
authorBrian Birtles <birtles@gmail.com>
Mon, 04 Jun 2018 10:20:57 +0900
changeset 475378 e7fb7955c589cb038713614b3357ecfeb50c70aa
parent 475377 31b0c91a0237f593c5911325936eff589d43d204
child 475379 4a4aafa588f86050dadc4ea7644639e4ac547461
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1466031
milestone62.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 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.
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];