Bug 1258607 - Output task names when entering and leaving in SimpleTest. r=jmaher draft
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Tue, 22 Mar 2016 16:48:59 -0400
changeset 343504 20dd7c6900978b6bc7d5993d1feff237fe81f3d6
parent 343282 9d614605ed1ff02c3af570e5710faa1e134434a4
child 343505 f5795e6367be9540d8cda38c0f0b8b9bba794c99
push id13643
push usermozilla@noorenberghe.ca
push dateTue, 22 Mar 2016 20:50:36 +0000
reviewersjmaher
bugs1258607
milestone48.0a1
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
testing/mochitest/tests/SimpleTest/SpawnTask.js
--- 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.)");
             }
           }