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..cd996cbc9056b1a8934b16720b30ed0f85cac2d6 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, |
Paweł Hajdan Jr.
2012/08/30 08:56:34
This is not obvious (at least to me). Could you ma
Ryan Sleevi
2012/08/30 14:25:46
Given that this enumeration is listing protocol sc
Paweł Hajdan Jr.
2012/08/31 07:51:29
Please add the comment then. "ws" is not that easy
Takashi Toyoshima
2012/09/01 09:07:30
WebSocket or ws.
I'm often worried about which is
Paweł Hajdan Jr.
2012/09/04 09:30:11
+1
|
+ 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 or TYPE_WSS, the TLS settings to use for the test |
+ // server. |
+ SSLOptions ssl_options_; |
Type type_; |