Bug 1283754 - Part 1: Drop await_timeout() and await_timeout(). r?boris draft
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Fri, 14 Oct 2016 06:51:37 +0900
changeset 425006 304d79bd9c2d1e67fa07cacdb5fb36a46bd865e3
parent 425005 a0d604653b1cfa8cead02fd81c50b951caa80d45
child 425007 637e88009a2a27518f257b17fc980960da367199
push id32314
push userbmo:hiikezoe@mozilla-japan.org
push dateFri, 14 Oct 2016 00:31:54 +0000
reviewersboris
bugs1283754
milestone52.0a1
Bug 1283754 - Part 1: Drop await_timeout() and await_timeout(). r?boris No one uses these functions. MozReview-Commit-ID: DLZXQdOzBZA
dom/animation/test/chrome/test_animation_observers.html
--- a/dom/animation/test/chrome/test_animation_observers.html
+++ b/dom/animation/test/chrome/test_animation_observers.html
@@ -124,33 +124,16 @@ function await_event(aElement, aEventNam
     function listener(aEvent) {
       aElement.removeEventListener(aEventName, listener);
       aResolve();
     }
     aElement.addEventListener(aEventName, listener, false);
   });
 }
 
-// Returns a Promise that is resolved after a given timeout duration.
-function await_timeout(aTimeout) {
-  return new Promise(function(aResolve) {
-    setTimeout(function() {
-      aResolve();
-    }, aTimeout);
-  });
-}
-
-// Returns a Promise that is resolved when the MutationObserver is next
-// invoked.
-function await_records() {
-  return new Promise(function(aResolve) {
-    gRecordPromiseResolvers.push(aResolve);
-  });
-}
-
 function assert_record_list(actual, expected, desc, index, listName) {
   is(actual.length, expected.length, `${desc} - record[${index}].${listName} length`);
   if (actual.length != expected.length) {
     return;
   }
   for (var i = 0; i < actual.length; i++) {
     ok(actual.indexOf(expected[i]) != -1,
        `${desc} - record[${index}].${listName} contains expected Animation`);