Bug 1381876 - Rename WaitCondition to Condition. r?automatedtester draft
authorAndreas Tolfsen <ato@sny.no>
Tue, 01 Aug 2017 18:26:09 +0100
changeset 641129 7586af25495a552f6f20ff3ee3191cbac8ab3064
parent 641128 7eeb43e2f45d79b64443d9a817d7ebdf757760cc
child 641130 12eccaf162cc8bb2a84e8fcb4cc97bdeb26793a5
push id72441
push userbmo:ato@sny.no
push dateSat, 05 Aug 2017 16:50:51 +0000
reviewersautomatedtester
bugs1381876
milestone57.0a1
Bug 1381876 - Rename WaitCondition to Condition. r?automatedtester The condition can be used for other things than poll-waiting. MozReview-Commit-ID: 1sudv5JuEQT
testing/marionette/wait.js
--- a/testing/marionette/wait.js
+++ b/testing/marionette/wait.js
@@ -13,17 +13,17 @@ this.EXPORTED_SYMBOLS = ["wait"];
 /**
  * Poll-waiting utilities.
  *
  * @namespace
  */
 this.wait = {};
 
 /**
- * @callback WaitCondition
+ * @callback Condition
  *
  * @param {function(*)} resolve
  *     To be called when the condition has been met.  Will return the
  *     resolved value.
  * @param {function} reject
  *     To be called when the condition has not been met.  Will cause
  *     the condition to be revaluated or time out.
  *
@@ -57,17 +57,17 @@ this.wait = {};
  *       if (res.length > 0) {
  *         resolve(Array.from(res));
  *       } else {
  *         reject([]);
  *       }
  *     });
  * </pre></code>
  *
- * @param {WaitCondition} func
+ * @param {Condition} func
  *     Function to run off the main thread.
  * @param {number=} timeout
  *     Desired timeout.  If 0 or less than the runtime evaluation time
  *     of |func|, |func| is guaranteed to run at least once.  The default
  *     is 2000 milliseconds.
  * @param {number=} interval
  *     Duration between each poll of |func| in milliseconds.  Defaults to
  *     10 milliseconds.