Bug 1073074: Browser chrome UI test output is broken. r=cmanchester
authorDave Townsend <dtownsend@oxymoronical.com>
Fri, 26 Sep 2014 10:56:22 -0700
changeset 207471 df3fe2e4bf8fe4a97a804e91b6128d035939844d
parent 207470 437731e3c70484efcb099a03c5beed7e0c1c788e
child 207472 26f99dd8b6520e52bfa296c547beb05446d1fd7b
push id27555
push userryanvm@gmail.com
push dateFri, 26 Sep 2014 20:30:28 +0000
treeherderautoland@4ff52be673f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscmanchester
bugs1073074
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1073074: Browser chrome UI test output is broken. r=cmanchester
testing/mochitest/browser-harness.xul
--- a/testing/mochitest/browser-harness.xul
+++ b/testing/mochitest/browser-harness.xul
@@ -163,18 +163,35 @@
       get htmlLog() {
         let txtToHTML = Cc["@mozilla.org/txttohtmlconv;1"].
                         getService(Ci.mozITXTToHTMLConv);
         function _entityEncode(str) {
           return txtToHTML.scanTXT(str, Ci.mozITXTToHTMLConv.kEntities);
         }
         var path = _entityEncode(this.path);
         var html = this.results.map(function (t) {
-          var classname = t.info ? "info" : "result " + (t.pass ? "passed" : "failed");
-          var text = t.result + " | " + path + " | " + _entityEncode(t.msg);
+          var classname = "result ";
+          var result = "TEST-";
+          if (t.info) {
+            classname = "info";
+            result += "INFO";
+          }
+          else if (t.pass) {
+            classname += "passed";
+            if (t.todo)
+              result += "KNOWN-FAIL";
+            else
+              result += "PASS";
+          }
+          else {
+            classname += "failed";
+            result += "UNEXPECTED-" + t.status;
+          }
+          var message = t.name + (t.msg ? " - " + t.msg : "");
+          var text = result + " | " + path + " | " + _entityEncode(message);
           if (!t.info && !t.pass) {
             return '<p class="' + classname + '" id=\"ERROR' + (gErrorCount++) + '">' +
                    text + " <a href=\"javascript:scrollTo('ERROR" + gErrorCount + "')\">NEXT ERROR</a></p>";
           }
           return '<p class="' + classname + '">' + text + "</p>";
         }).join("\n");
         if (this.duration) {
           html += "<p class=\"info\">TEST-END | " + path + " | finished in " +