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

Unified Diff: net/test/test_server.h

Issue 6404003: Silence testserver logs when tests are run in non-verbose mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | « chrome/test/live_sync/live_sync_test.cc ('k') | net/test/test_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/test_server.h
diff --git a/net/test/test_server.h b/net/test/test_server.h
index c83b2846e67d1cda606075e260f3aa0fa6bd7d78..c5a1932b42609083be903c69c60ae45ff154f2f7 100644
--- a/net/test/test_server.h
+++ b/net/test/test_server.h
@@ -113,6 +113,13 @@ class TestServer {
// Stop the server started by Start().
bool Stop();
+ // Enables/disables sys.stdout logging by testserver.py (enabled by default).
+ // To disable console logging, call this method before Start(). Note: This
+ // does not affect the test server logs that are written to file.
+ void SetConsoleLogging(bool log_to_console) {
Paweł Hajdan Jr. 2011/01/29 10:26:24 Please don't add new setters to this class. Can th
Raghu Simha 2011/01/29 10:50:38 It certainly can. The reason I added this setter w
+ log_to_console_ = log_to_console;
+ }
+
const FilePath& document_root() const { return document_root_; }
const HostPortPair& host_port_pair() const;
const DictionaryValue& server_data() const;
@@ -201,6 +208,10 @@ class TestServer {
// Has the server been started?
bool started_;
+ // Flag that controls whether test server logs are printed to the console in
+ // addition to a log file. Has a value of true by default.
+ bool log_to_console_;
+
DISALLOW_COPY_AND_ASSIGN(TestServer);
};
« no previous file with comments | « chrome/test/live_sync/live_sync_test.cc ('k') | net/test/test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698