testconcat-707492: Create 'exports' alias

In short: s/exports/mockCommands/g.
In general we've been reducing the number of exports aliases, because
although it's handy when moving code from one module to another to not
have the functions change name from exports.foo to blah.foo, that's not
a regular occurrence, and it creates complexity. However in this case
where we're importing code into Firefox mochitests where everything is
in the same global, it's much simpler.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
testconcat-707492: Remove defaultOptions

defaultOptions were useful when we had environments (e.g. node) where
we had no DOM, but since we've been using JS-DOM, we don't need to have
a tiny fake DOM, because we've got a big fake DOM.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
testconcat-707492: Remove test guards

We were previously protecting all sort of failing tests against things
like tiny fake DOM implementations. Since we're doing so much test
hackery now is a good time to re-evaluate them all.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
testconcat-707492: s/test/assert/g & fix testResource

Moving test files into firefox JS land brings up a name clash over
'test', where in mochitest 'test' is the name of the initial test
function, and here is is what we call the assert module by default.

It's normal with GCLI to call imported modules by their name, so we are
renaming the import of the assert module to assert, which solves both
problems.

Also a previous changeset in this series removed all of the fakeDom and
firefox guards from the tests. The resource test module still fails
because we're not running the tests in the environment that it expects
so the failing tests are re-skipped.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
testconcat-707492: remove options from exec

For some reason the version of helpers in firefox was one step ahead
of the version of helpers in GCLI in getting rid of the redundant
'options' parameter. This brings GCLI up to date with the firefox way,
needed now because the GCLI tests are now running against the firefox
helpers implementation.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
testconcat-707492: Update build for separate files

Finally we update the Firefox build step to just copy over the GCLI
test files, converting them into mochitest files as they go by:
- Adding a test() function
- Using helpers/assert/mockCommands from builtin

This change also has the nice side-effect of getting rid of several
mozilla build files from the GCLI tree.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
Merge branch 'asyncout-773313' into landing

Conflicts:
	lib/gclitest/helpers.js

Signed-off-by: Joe Walker <jwalker@mozilla.com>
menuclick-788215: Add ' ' prefix on menu click.

There is a downside of this simple fix, that sometimes when there is a
space as a suffix of the prior argument, that we end up with two spaces.
While this is clearly a minor problem, it's nowhere near as serious as
getting the menu click wrong.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
menuclick-788215: Correct case in gethighlightingProxy

Capital 'H': s/gethighlightingProxy/getHighlightingProxy/g

Signed-off-by: Joe Walker <jwalker@mozilla.com>
menuclick-788215: textContent strips HTML from name

Using innerHTML worked fine on UAs without Proxy support because the
name highlighting doesn't work on those platforms. The correct solution
either way is to use textContent.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
menuclick-788215: Fix menu activation for <RETURN>

The same 2 problems with menu click (i.e. using innerHTML and not adding
a space prefix) need solving for keyboard activation too.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
menuclick-788215: Pass arg to itemClicked not conversion

Push the conversion down the stack closer to the requisition, which is
where we want the conversion to be done.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
menuclick-788215: Convert setAssignment to use options

We had setAssignment and _setAssignment, but the distinction (internal
vs. external) wasn't helpful, so we're merging them.
We need to add another customization - to duplicate arg padding, and
we don't want to do that as another parameter, so we are moving to an
options syntax, and removing the negative on argUpdate while we are at
it.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
menuclick-788215: Take spaces into account

Add the 'matchPadding' option to setAssignment to copy the prefix and
suffix from the original argument if the new argument doesn't contain
any prefix/suffix.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
Merge branch 'menuclick-788215' into asynctypes-685526

Conflicts:
	lib/gcli/cli.js
	lib/gclitest/helpers.js
	lib/gclitest/mockCommands.js
	lib/gclitest/testKeyboard.js