Bug 1360667 - Change location of coverage collection in xpcshell. r?jmaher
MozReview-Commit-ID: EsA8hTKd15Y
--- a/testing/xpcshell/head.js
+++ b/testing/xpcshell/head.js
@@ -533,23 +533,23 @@ function _execute_test() {
// Else, call run_next_test() directly to invoke tests
// added by add_test() and add_task().
if (typeof run_test === "function") {
run_test();
} else {
run_next_test();
}
+ do_test_finished("MAIN run_test");
+ _do_main();
+ _PromiseTestUtils.assertNoUncaughtRejections();
+
if (coverageCollector != null) {
coverageCollector.recordTestCoverage(_TEST_FILE[0]);
}
-
- do_test_finished("MAIN run_test");
- _do_main();
- _PromiseTestUtils.assertNoUncaughtRejections();
} catch (e) {
_passed = false;
// do_check failures are already logged and set _quit to true and throw
// NS_ERROR_ABORT. If both of those are true it is likely this exception
// has already been logged so there is no need to log it again. It's
// possible that this will mask an NS_ERROR_ABORT that happens after a
// do_check failure though.