mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-09 12:51:09 +02:00
Changes in this patch: * GCLI gave up with testing via phantomjs a while ago, but the docs didn't keep up, so this fixes the docs. * gcli/languages/command isn't used in Firefox, but on the web if a converter wrongly produces a null DOM node, then the UI just looks blank, so this change makes the error more obvious. However we don't use this in Firefox. I'd like to remove the module, but not in this patch. * The delegate type (used when we want to defer the type of a parameter, e.g. with "pref set PREFNAME VALUE" where the type of value depends on PREFNAME) forced children to be prediction-less. This allows them to decide for themselves * The file type assumed that the local filesystem was the same as the remote one which is clearly wrong. The change to gcli/types/file fixes that. * Typo fix to gcli/util/util * On very slow connections gcli/cli.js could get in a pickle where 2 changes happened out of order. We've planned for this, but got in wrong, so this just adds a bit of defensive programming. MozReview-Commit-ID: H88W5UDCikM --HG-- extra : rebase_source : b4e3da062881a841221c4f8cc9e64046756ed763
664 B
664 B
Writing Tests
There are several sources of GCLI tests and several environments in which they are run.
The majority of GCLI tests are stored in
this repository in files named like
./lib/gclitest/test*.js. These tests run in Firefox, Chrome, Opera,
and NodeJS/JsDom
See Running Tests for further details.
GCLI comes with a generic unit test harness (in ./lib/test/) and a
set of helpers for creating GCLI tests (in ./lib/gclitest/helpers.js).
GCLI tests in Firefox
The build process converts the GCLI tests to run under Mochitest inside the Firefox unit tests. It also adds some