mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 01:35:35 +00:00
74fbed7467
This patch moves the "timeout" and "interval" positional arguments on PollPromise to an options dictionary. In the following code example it is hard to know which argument means what because they are not named: new PollPromise(resolve => resolve(), 100, 100); Named arguments can be achieved in JavaScript using option dictionaries, and this patch changes the input PollPromise takes so that the above example looks like this: new PollPromise(resolve => resolve(), {timeout: 100, interval: 100}; This plays especially well with code in testing/marionette/element.js as we already have named arguments that we can pass directly in through an object literal, making the code more readable and more compact: let timeout = 42; new PollPromise(resolve => resolve(), {timeout}); MozReview-Commit-ID: GFWNGQAeWk1 --HG-- extra : rebase_source : 296843053e72bd07463a3018b06782f0dcc4828a |
||
---|---|---|
.. | ||
awsy | ||
config | ||
crashtest | ||
firefox-ui | ||
geckodriver | ||
gtest | ||
instrumentation | ||
marionette | ||
mochitest | ||
modules | ||
mozbase | ||
mozharness | ||
profiles | ||
runtimes | ||
specialpowers | ||
talos | ||
tools | ||
tps | ||
web-platform | ||
webdriver | ||
xpcshell | ||
cppunittest.ini | ||
mach_commands.py | ||
moz.build | ||
README.txt | ||
remotecppunittests.py | ||
runcppunittests.py | ||
testsuite-targets.mk |
Common testing tools for mozilla codebase projects, test suite definitions for automated test runs, tests that don't fit anywhere else, and other fun stuff