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

Unified Diff: net/test/base_test_server.cc

Issue 11085039: WebSocket test server migration on browser_tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: browser_tests done Created 8 years, 2 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/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_);

Powered by Google App Engine
This is Rietveld 408576698