bug 379327 - have browser chrome tests print test filename in FAIL lines. r=gavin
authorted.mielczarek@gmail.com
Tue, 04 Sep 2007 08:47:55 -0700
changeset 5639 e5e8e3713e80714b44952e62697a74759fe70a74
parent 5638 12f924e316f6d42f5ab8b5da55a98e5b1a162b97
child 5640 aeebfd6cfa0e36bb79e22895a81bc33e5804307b
push idunknown
push userunknown
push dateunknown
reviewersgavin
bugs379327
milestone1.9a8pre
bug 379327 - have browser chrome tests print test filename in FAIL lines. r=gavin
testing/mochitest/browser-harness.xul
--- a/testing/mochitest/browser-harness.xul
+++ b/testing/mochitest/browser-harness.xul
@@ -111,17 +111,22 @@
       },
       get todoCount() {
         return this.tests.filter(function (t) t.todo && t.pass).length;
       },
       get failCount() {
         return this.tests.filter(function (t) !t.pass).length;
       },
       get log() {
-        return this.tests.map(function (t) t.msg).join("\n");
+        var path = this.path;
+        return this.tests.map(function (t) {
+                                if (!t.pass)
+                                  return t.msg + " - " + path;
+                                return t.msg;
+                              }).join("\n");
       }
     };
 
     // Returns an array of chrome:// URLs to all the test files
     function listTests() {
       const Cc = Components.classes; const Ci = Components.interfaces;
 
       var testsDir = getChromeDir();