Bug 1397127 - Rewrite a test with async/await. r=birtles
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 06 Sep 2017 13:51:18 +0900
changeset 428599 3740b33560ce05cf0779c7285d7177e69ba7de2b
parent 428598 0ce1edf053dc4b0cd7aeaa2391e7a2fbca134b1e
child 428600 c6e59f1b2e2720376a94d30ebabf9fcc60e4f87e
child 428631 a2a1ce612e91893ee3bc4c93d2a63b210a954340
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1397127
milestone57.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 1397127 - Rewrite a test with async/await. r=birtles MozReview-Commit-ID: Jdh4G022Gzd
dom/animation/test/chrome/test_restyles.html
--- a/dom/animation/test/chrome/test_restyles.html
+++ b/dom/animation/test/chrome/test_restyles.html
@@ -1003,34 +1003,34 @@ waitForAllPaints(function() {
     is(markers.length, 0,
        'CSS animation on an out-of-view element with pre-transform should be ' +
        'throttled.');
 
     await ensureElementRemoval(scrollDiv);
   });
 
   add_task_if_omta_enabled(
-    function* no_restyling_for_compositor_animation_on_unrelated_style_change() {
+    async function no_restyling_for_compositor_animation_on_unrelated_style_change() {
       var div = addDiv(null);
       var animation = div.animate({ opacity: [0, 1] }, 100 * MS_PER_SEC);
 
-      yield animation.ready;
+      await animation.ready;
       ok(animation.isRunningOnCompositor,
          'The opacity animation is running on the compositor');
 
       div.style.setProperty('color', 'blue', '');
-      var markers = yield observeStyling(5);
+      var markers = await observeStyling(5);
       if (isServo) {
         is(markers.length, 0,
            'The opacity animation keeps running on the compositor when ' +
            'color style is changed');
       } else {
         todo_is(markers.length, 0,
                 'Bug 1307341 The opacity animation keeps running on the ' +
                 'compositor when color style is changed');
       }
-      yield ensureElementRemoval(div);
+      await ensureElementRemoval(div);
     }
   );
 });
 
 </script>
 </body>