Index: net/test/base_test_server.cc |
diff --git a/net/test/base_test_server.cc b/net/test/base_test_server.cc |
index e672f19207355171bdd30a2fe7e8ce98c8560213..6410f2b1bc9c6d72d2519680a324220b5c45d0b0 100644 |
--- a/net/test/base_test_server.cc |
+++ b/net/test/base_test_server.cc |
@@ -210,6 +210,17 @@ GURL BaseTestServer::GetURLWithUserAndPassword(const std::string& path, |
host_port_pair_.ToString() + "/" + path); |
} |
+GURL BaseTestServer::GetAlternateURL(const std::string& path) const { |
+ std::string scheme; |
+ if (type_ == TYPE_WS) |
+ scheme = "http"; |
+ else if (type_ == TYPE_WSS) |
+ scheme = "https"; |
+ else |
+ NOTREACHED(); |
+ return GURL(scheme + "://" + host_port_pair_.ToString() + "/" + path); |
+} |
+ |
// static |
bool BaseTestServer::GetFilePathWithReplacements( |
const std::string& original_file_path, |
@@ -339,8 +350,9 @@ bool BaseTestServer::GenerateArguments(base::DictionaryValue* arguments) const { |
if (VLOG_IS_ON(1) || log_to_console_) |
arguments->Set("log-to-console", base::Value::CreateNullValue()); |
- if (type_ == TYPE_HTTPS) { |
- arguments->Set("https", base::Value::CreateNullValue()); |
+ if (UsingSSL(type_)) { |
+ if (type_ == TYPE_HTTPS) |
+ arguments->Set("https", base::Value::CreateNullValue()); |
// Check the certificate arguments of the HTTPS server. |
FilePath certificate_path(certificates_dir_); |