Bug 1258607 - Output task names when entering and leaving in SimpleTest. r=jmaher
This uses the same text as the equivalent code in browser-test.js.
MozReview-Commit-ID: 2CzZEjf8ojn
--- a/testing/mochitest/tests/SimpleTest/SpawnTask.js
+++ b/testing/mochitest/tests/SimpleTest/SpawnTask.js
@@ -267,17 +267,20 @@ var add_task = (function () {
// Use setTimeout to ensure the master task runs after the client
// script finishes.
setTimeout(function () {
spawn_task(function* () {
// We stop the entire test file at the first exception because this
// may mean that the state of subsequent tests may be corrupt.
try {
for (var task of task_list) {
+ var name = task.name || "";
+ info("SpawnTask.js | Entering test " + name);
yield task();
+ info("SpawnTask.js | Leaving test " + name);
}
} catch (ex) {
try {
ok(false, "" + ex);
} catch (ex2) {
ok(false, "(The exception cannot be converted to string.)");
}
}