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

Unified Diff: net/test/test_server.cc

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
Index: net/test/test_server.cc
diff --git a/net/test/test_server.cc b/net/test/test_server.cc
index 36ebf334753381b80c11e5d6ff0f240352a7db73..55734bd6ed8b74529f22000b6544407877cfb6b1 100644
--- a/net/test/test_server.cc
+++ b/net/test/test_server.cc
@@ -87,7 +87,8 @@ FilePath TestServer::HTTPSOptions::GetCertificateFile() const {
TestServer::TestServer(Type type, const FilePath& document_root)
: type_(type),
- started_(false) {
+ started_(false),
+ log_to_console_(true) {
Init(document_root);
}
@@ -95,7 +96,8 @@ TestServer::TestServer(const HTTPSOptions& https_options,
const FilePath& document_root)
: https_options_(https_options),
type_(TYPE_HTTPS),
- started_(false) {
+ started_(false),
+ log_to_console_(true) {
Init(document_root);
}
@@ -345,6 +347,10 @@ bool TestServer::AddCommandLineArguments(CommandLine* command_line) const {
base::IntToString(host_port_pair_.port()));
command_line->AppendSwitchPath("data-dir", document_root_);
+ if (log_to_console_) {
+ command_line->AppendArg("--log-to-console");
+ }
+
if (type_ == TYPE_FTP) {
command_line->AppendArg("-f");
} else if (type_ == TYPE_SYNC) {

Powered by Google App Engine
This is Rietveld 408576698