Bug 1702271 - Document waitForCondition msg arg. r=florian DONTBUILD

This also makes a couple of other fixes to existing comments to bring them in
line with the actual behaviour and names used.

Differential Revision: https://phabricator.services.mozilla.com/D110428
This commit is contained in:
Bryce Seager van Dyk 2021-03-31 17:40:51 +00:00
Родитель 30b2db3912
Коммит bb3170ecf7
1 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -149,12 +149,17 @@ var TestUtils = {
*
* @param condition
* A condition function that must return true or false. If the
* condition ever throws, this is also treated as a false. The
* function can be an async function.
* condition ever throws, this function fails and rejects the
* returned promise. The function can be an async function.
* @param msg
* A message used to describe the condition being waited for.
* This message will be used to reject the promise should the
* wait fail. It is also used to add a profiler marker in the
* success case.
* @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)