Bug 1469334 - Properly document arguments for ContentTaskUtils.waitForCondition. r?jmaher draft
authorJan-Erik Rediger <jrediger@mozilla.com>
Mon, 18 Jun 2018 18:39:40 +0200
changeset 808176 192f073adca94040fddeed643f0018f2638cb117
parent 808175 9e59cf4257ede2d42730d7cb4173f02d81e8f527
push id113303
push userbmo:jrediger@mozilla.com
push dateMon, 18 Jun 2018 16:42:17 +0000
reviewersjmaher
bugs1469334
milestone62.0a1
Bug 1469334 - Properly document arguments for ContentTaskUtils.waitForCondition. r?jmaher MozReview-Commit-ID: BFhDX9nVTKT
testing/mochitest/BrowserTestUtils/ContentTaskUtils.jsm
--- a/testing/mochitest/BrowserTestUtils/ContentTaskUtils.jsm
+++ b/testing/mochitest/BrowserTestUtils/ContentTaskUtils.jsm
@@ -20,20 +20,24 @@ ChromeUtils.import("resource://gre/modul
 
 var ContentTaskUtils = {
   /**
    * Will poll a condition function until it returns true.
    *
    * @param condition
    *        A condition function that must return true or false. If the
    *        condition ever throws, this is also treated as a false.
+   * @param msg
+   *        The message to use when the returned promise is rejected.
+   *        This message will be extended with additional information
+   *        about the number of tries or the thrown exception.
    * @param interval
    *        The time interval to poll the condition function. Defaults
    *        to 100ms.
-   * @param attempts
+   * @param maxTries
    *        The number of times to poll before giving up and rejecting
    *        if the condition has not yet returned true. Defaults to 50
    *        (~5 seconds for 100ms intervals)
    * @return Promise
    *        Resolves when condition is true.
    *        Rejects if timeout is exceeded or condition ever throws.
    */
   waitForCondition(condition, msg, interval = 100, maxTries = 50) {