Index: net/test/base_test_server.h |
diff --git a/net/test/base_test_server.h b/net/test/base_test_server.h |
index 354746503c2a54052316f9a00b4a6fe04d72d37c..a77396feb9972cbdf7b39102bc4a4b81af99b9a5 100644 |
--- a/net/test/base_test_server.h |
+++ b/net/test/base_test_server.h |
@@ -35,14 +35,16 @@ class BaseTestServer { |
TYPE_GDATA, |
TYPE_HTTP, |
TYPE_HTTPS, |
+ TYPE_WS, |
+ TYPE_WSS, |
TYPE_SYNC, |
TYPE_TCP_ECHO, |
TYPE_UDP_ECHO, |
}; |
- // Container for various options to control how the HTTPS server is |
+ // Container for various options to control how the HTTPS or WSS server is |
// initialized. |
- struct HTTPSOptions { |
+ struct SSLOptions { |
enum ServerCertificate { |
CERT_OK, |
@@ -95,12 +97,12 @@ class BaseTestServer { |
TLS_INTOLERANT_TLS1_2 = 3, // Intolerant of TLS 1.2 or higher. |
}; |
- // Initialize a new HTTPSOptions using CERT_OK as the certificate. |
- HTTPSOptions(); |
+ // Initialize a new SSLOptions using CERT_OK as the certificate. |
+ SSLOptions(); |
- // Initialize a new HTTPSOptions that will use the specified certificate. |
- explicit HTTPSOptions(ServerCertificate cert); |
- ~HTTPSOptions(); |
+ // Initialize a new SSLOptions that will use the specified certificate. |
+ explicit SSLOptions(ServerCertificate cert); |
+ ~SSLOptions(); |
// Returns the relative filename of the file that contains the |
// |server_certificate|. |
@@ -151,8 +153,8 @@ class BaseTestServer { |
// Initialize a TestServer listening on a specific host (IP or hostname). |
BaseTestServer(Type type, const std::string& host); |
- // Initialize a HTTPS TestServer with a specific set of HTTPSOptions. |
- explicit BaseTestServer(const HTTPSOptions& https_options); |
+ // Initialize a TestServer with a specific set of SSLOptions for HTTPS or WSS. |
+ explicit BaseTestServer(Type type, const SSLOptions& ssl_options); |
// Returns the host port pair used by current Python based test server only |
// if the server is started. |
@@ -225,8 +227,9 @@ class BaseTestServer { |
// Holds the data sent from the server (e.g., port number). |
scoped_ptr<base::DictionaryValue> server_data_; |
- // If |type_| is TYPE_HTTPS, the TLS settings to use for the test server. |
- HTTPSOptions https_options_; |
+ // If |type_| is TYPE_HTTPS ir TYPE_WSS, the TLS settings to use for the test |
Ryan Sleevi
2012/08/22 09:21:16
nit: ir -> or
Takashi Toyoshima
2012/08/22 13:39:16
Done.
|
+ // server. |
+ SSLOptions ssl_options_; |
Type type_; |