Only the httpd.js unit tests actually rely on this. I tried to make them use Cu.import but they also rely on poking a bunch of stuff in httpd.js that's not exported, so instead I just made the test manifest copy httpd.js to the test directory and had them load it from there.
--HG--
extra : rebase_source : 24b04d619891ec95e5df23a2eb7f3277dd3206b2
extra : amend_source : 72139cecdcd695171e2fd0ce8ea7be91c1eebd1a
There's a test for add_task() in selftest.py called ADD_TASK_MULTIPLE, which tests if
multiple add_task() tests are working. The test added in this commit does the exact same
except without run_test(). Since the original tests included this, I thought it would make
a good case for checking if the removal of run_test() is working as expected. Please remove
if this is unnecessary.
--HG--
extra : rebase_source : f6617259056db7ac7a658a89063694f51408b8ce
Since the simple test cases before this bug had cases for both passing and
failing, it would be a good idea to follow suit and add similar failing tests
for when run_test() is omitted.
Like the other simple tests defined in selftest.py, SIMPLE_FAILING_TEST,
ADD_TEST_FAILING, etc., it follows a similar pattern except these are done
without run_test() defined.
--HG--
extra : rebase_source : a1ef9a7b9e8274fe981864c5e021c80d2d66f7ec
Four new test cases have been added to testing/xpcshell/selftest.py.
These new tests check that tests where run_test() is not defined
work properly.
The test cases check the following cases:
1. when only add_test() is used.
2. when only add_task() is used.
3. when both add_task() and add_test() is used.
4. when a test file is empty, i.e. contains no add_test(), add_task() or
run_test().
Test bodies only consist of do_check_true(true) calls to make up a minimal
test without run_test() in the same vein as the other simple tests defined
previously.
Also, broke a comment up that was too long.
--HG--
extra : rebase_source : 48d055680ba8108816ecbe07008496c5281f46cc
As referenced in Bug 982852, this fix makes run_tests() optional.
Test cases can now consist of add_test() and add_task() calls
without the need to exclusively set up a run_test() just to call
run_next_test() inside it. If run_test() however is defined, it
will be called directly as usual, which should keep all older
tests working without breaking.
Since most run_test() calls right now are mostly boilerplate and
usually are of the form -- function run_test(){run_next_test();} --
this fix checks if run_test is defined by using the typeof operator
which should evaluate to "function" if it is defined. If defined,
it is called straight away, otherwise, run_next_test() is called,
which is what run_test() usually does when used as a set up to
call tests registered by add_test() and add_task().
--HG--
extra : rebase_source : 7cfbf30a67e3a8d088f8409edcdde8976f46b941
This is for aurora (dev edition) compatibility. In this channel, there is a
selected lightweight theme by default. Tests don't expect this to be the case
so this simply resets the relevant prefs for mochitests and xpcshell tests.
Add a `tags` attribute to a test or DEFAULT section in a manifest:
[test_foo]
tags = foo
Then run all tests with a given tag by passing in `--tag foo` to a supported test harness. So far mochitest, xpcshell and marionette are supported.
--HG--
extra : rebase_source : d75905da1ca021a15a9538117d3866425f73d962
extra : source : 3c34fd480729e3b6684fba747ff61078f672ce16
Add a `tags` attribute to a test or DEFAULT section in a manifest:
[test_foo]
tags = foo
Then run all tests with a given tag by passing in `--tag foo` to a supported test harness. So far mochitest, xpcshell and marionette are supported.
--HG--
extra : rebase_source : 68a0931c6a8ee1df4f5c09d67c396490774aa856
This only updates node-http2 for mozilla's CI needs by supporting
sending of the AltSvc frame (-06). It does not implement receiving or
the node internal tests.