Skip to content

Commit

Permalink
Bug 1052937 - Default value for missing subtest in mochitest structur…
Browse files Browse the repository at this point in the history
…ed logs. r=ahal
  • Loading branch information
halflings committed Aug 19, 2014
1 parent 3327c64 commit 9ea1148
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions testing/mochitest/tests/SimpleTest/SimpleTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,6 @@ SimpleTest._cleanupFunctions = [];
* Something like assert.
**/
SimpleTest.ok = function (condition, name, diag) {
if (name === null || name === undefined) {
name = "undefined assertion name";
}
var test = {'result': !!condition, 'name': name, 'diag': diag};
var successInfo = {status:"PASS", expected:"PASS", message:"TEST-PASS"};
var failureInfo = {status:"FAIL", expected:"PASS", message:"TEST-UNEXPECTED-FAIL"};
Expand Down
5 changes: 5 additions & 0 deletions testing/mochitest/tests/SimpleTest/TestRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ function StructuredLogger(name) {
};

this.testStatus = function(test, subtest, status, expected="PASS", message=null) {
// Bugfix for assertions not passing an assertion name
if (subtest === null || subtest === undefined) {
subtest = "undefined assertion name";
}

var data = {test: test, subtest: subtest, status: status};

if (message) {
Expand Down

0 comments on commit 9ea1148

Please sign in to comment.