Make mochitest print the amount of time each test takes. (Bug 482162) r=ted

This commit is contained in:
L. David Baron 2010-06-08 18:44:31 -07:00
Родитель bff9ad37a8
Коммит ead6da230f
1 изменённых файлов: 6 добавлений и 3 удалений

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

@ -181,9 +181,12 @@ TestRunner.runNextTest = function() {
* This stub is called by SimpleTest when a test is finished.
**/
TestRunner.testFinished = function(tests) {
if (TestRunner.logEnabled)
TestRunner.logger.debug("SimpleTest finished " +
TestRunner._urls[TestRunner._currentTest]);
if (TestRunner.logEnabled) {
var runtime = new Date().valueOf() - TestRunner._currentTestStartTime;
TestRunner.logger.log("SimpleTest finished " +
TestRunner._urls[TestRunner._currentTest] +
" in " + runtime + "ms");
}
TestRunner.updateUI(tests);
TestRunner._currentTest++;