Bug 1283754 - Part 1: Drop await_timeout() and await_timeout(). r?boris
No one uses these functions.
MozReview-Commit-ID: DLZXQdOzBZA
--- 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`);