summaryrefslogtreecommitdiffstats
path: root/net/test
diff options
context:
space:
mode:
authorbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-16 10:47:47 +0000
committerbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-16 10:47:47 +0000
commit8eb127e07794373951ee9935e73d06b35082a9b0 (patch)
tree68bf19beee18dabcfca87764443b5302f20f3a81 /net/test
parentfde269d9e7b0382de1796b416b72ba34a47900aa (diff)
downloadchromium_src-8eb127e07794373951ee9935e73d06b35082a9b0.zip
chromium_src-8eb127e07794373951ee9935e73d06b35082a9b0.tar.gz
chromium_src-8eb127e07794373951ee9935e73d06b35082a9b0.tar.bz2
Introduce logging to console and re-enable URLRequestTestHTTP.ProxyTunnelRedirectTest
BUG=96594 TEST=no Review URL: http://codereview.chromium.org/7901014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test')
-rw-r--r--net/test/test_server.cc12
-rw-r--r--net/test/test_server.h3
2 files changed, 12 insertions, 3 deletions
diff --git a/net/test/test_server.cc b/net/test/test_server.cc
index faf1090..d0a8cb9 100644
--- a/net/test/test_server.cc
+++ b/net/test/test_server.cc
@@ -81,7 +81,8 @@ FilePath TestServer::HTTPSOptions::GetCertificateFile() const {
TestServer::TestServer(Type type, const FilePath& document_root)
: type_(type),
- started_(false) {
+ started_(false),
+ log_to_console_(false) {
Init(document_root);
}
@@ -89,7 +90,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_(false) {
Init(document_root);
}
@@ -278,6 +280,10 @@ void TestServer::Init(const FilePath& document_root) {
.Append(FILE_PATH_LITERAL("data"))
.Append(FILE_PATH_LITERAL("ssl"))
.Append(FILE_PATH_LITERAL("certificates"));
+
+ // TODO(battre) Remove this after figuring out why the TestServer is flaky.
+ // http://crbug.com/96594
+ log_to_console_ = true;
}
bool TestServer::SetPythonPath() {
@@ -354,7 +360,7 @@ bool TestServer::AddCommandLineArguments(CommandLine* command_line) const {
command_line->AppendArgNative(FILE_PATH_LITERAL("--data-dir=") +
document_root_.value());
- if (VLOG_IS_ON(1)) {
+ if (VLOG_IS_ON(1) || log_to_console_) {
command_line->AppendArg("--log-to-console");
}
diff --git a/net/test/test_server.h b/net/test/test_server.h
index 5efd6ba..8d6d8a2 100644
--- a/net/test/test_server.h
+++ b/net/test/test_server.h
@@ -206,6 +206,9 @@ class TestServer {
// Has the server been started?
bool started_;
+ // Enables logging of the server to the console.
+ bool log_to_console_;
+
DISALLOW_COPY_AND_ASSIGN(TestServer);
};