No bug - Also log the number of elided messages when finishing the test.

This commit is contained in:
Ms2ger 2012-07-18 12:36:08 +02:00
Родитель 49e9bf3592
Коммит 202ac4c8c6
1 изменённых файлов: 14 добавлений и 8 удалений

Просмотреть файл

@ -69,6 +69,17 @@ var W3CTest = {
this.runner[(test.result === !test.todo) ? "log" : "error"](msg);
},
"_logCollapsedMessages": function() {
if (this.collapsedMessages) {
this._log({
"result": true,
"todo": false,
"message": "Elided " + this.collapsedMessages + " passes or known failures."
});
}
this.collapsedMessages = 0;
},
/**
* Maybe logs a result, eliding up to MAX_COLLAPSED_MESSAGES consecutive
* passes.
@ -78,14 +89,7 @@ var W3CTest = {
if (success && ++this.collapsedMessages < this.MAX_COLLAPSED_MESSAGES) {
return;
}
if (this.collapsedMessages) {
this._log({
"result": true,
"todo": false,
"message": "Elided " + this.collapsedMessages + " passes or known failures."
});
}
this.collapsedMessages = 0;
this._logCollapsedMessages();
this._log(test);
},
@ -143,6 +147,8 @@ var W3CTest = {
this.expectedFailures[url] === "error"
});
this._logCollapsedMessages();
if (this.dumpFailures) {
dump("@@@ @@@ Failures\n");
dump(url + "@@@" + JSON.stringify(this.failures) + "\n");