Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(810)

Unified Diff: chrome/browser/diagnostics/diagnostics_main.cc

Issue 6098004: Integrate about:conflicts with --diagnostics... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/diagnostics/diagnostics_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/diagnostics/diagnostics_main.cc
===================================================================
--- chrome/browser/diagnostics/diagnostics_main.cc (revision 70409)
+++ chrome/browser/diagnostics/diagnostics_main.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -204,9 +204,14 @@
public:
// The |console| must be valid and properly initialized. This
// class does not own it.
- explicit TestWriter(SimpleConsole* console) : console_(console) {
+ explicit TestWriter(SimpleConsole* console)
+ : console_(console),
+ failures_(0) {
}
+ // How many tests reported failure.
+ int failures() { return failures_; }
+
// Write an informational line of text in white over black.
bool WriteInfoText(const std::wstring& txt) {
console_->SetColor(SimpleConsole::DEFAULT);
@@ -224,6 +229,7 @@
} else {
console_->SetColor(SimpleConsole::RED);
console_->Write(L"[FAIL] ");
+ failures_++;
}
WriteInfoText(name + L"\n");
std::wstring second_line(L" ");
@@ -235,6 +241,9 @@
SimpleConsole* console_;
+ // Keeps track of how many tests reported failure.
+ int failures_;
+
DISALLOW_COPY_AND_ASSIGN(TestWriter);
};
@@ -290,7 +299,12 @@
}
virtual void OnDoneAll(DiagnosticsModel* model) {
- writer_->WriteInfoText(L"DONE\n\n");
+ if (writer_->failures() > 0) {
+ writer_->WriteInfoText(StringPrintf(L"DONE. %d failure(s)\n\n",
+ writer_->failures()));
+ } else {
+ writer_->WriteInfoText(L"DONE\n\n");
+ }
}
private:
« no previous file with comments | « no previous file | chrome/browser/diagnostics/diagnostics_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698