BrowserChrome: always use 'Passed' and 'Failed' idents

Bug 473506 - Synchronize BrowserChrome and Mochitest log formats; (Bv1a)
r=rcampbell
This commit is contained in:
Serge Gautherie 2009-10-29 01:29:41 +01:00
parent 562957e400
commit ec612a3f36

View File

@ -74,13 +74,15 @@ Tester.prototype = {
if (this.tests.length) {
this.dumper.dump("\nBrowser Chrome Test Summary\n");
function sum(a,b) a+b;
var passCount = this.tests.map(function (f) f.passCount).reduce(sum);
var failCount = this.tests.map(function (f) f.failCount).reduce(sum);
var todoCount = this.tests.map(function (f) f.todoCount).reduce(sum);
this.dumper.dump("\tPass: " + passCount + "\n\tFail: " + failCount + "\n\tTodo: " + todoCount + "\n");
this.dumper.dump("\tPassed: " + passCount + "\n" +
"\tFailed: " + failCount + "\n" +
"\tTodo: " + todoCount + "\n");
} else {
this.dumper.dump("TEST-UNEXPECTED-FAIL | (browser-test.js) | " +
"No tests to run. Did you pass an invalid --test-path?");