OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_TEST_TEST_SERVER_H_ | 5 #ifndef NET_TEST_TEST_SERVER_H_ |
6 #define NET_TEST_TEST_SERVER_H_ | 6 #define NET_TEST_TEST_SERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 // If true, pass the --https-record-resume argument to testserver.py which | 107 // If true, pass the --https-record-resume argument to testserver.py which |
108 // causes it to log session cache actions and echo the log on | 108 // causes it to log session cache actions and echo the log on |
109 // /ssl-session-cache. | 109 // /ssl-session-cache. |
110 bool record_resume; | 110 bool record_resume; |
111 }; | 111 }; |
112 | 112 |
113 // Pass as the 'host' parameter during construction to server on 127.0.0.1 | 113 // Pass as the 'host' parameter during construction to server on 127.0.0.1 |
114 static const char* kLocalhost; | 114 static const char* kLocalhost; |
115 | 115 |
116 // Initialize a TestServer listening on 127.0.0.1. | 116 // Initialize a TestServer listening on the specified host (IP or hostname). |
117 TestServer(Type type, const FilePath& document_root); | 117 TestServer(Type type, const std::string& host, const FilePath& document_root); |
118 | |
119 // Initialize a TestServer listening on a specific host (IP or hostname). | |
120 TestServer(Type type, | |
121 const std::string& host, | |
122 const FilePath& document_root); | |
123 | 118 |
124 // Initialize a HTTPS TestServer with a specific set of HTTPSOptions. | 119 // Initialize a HTTPS TestServer with a specific set of HTTPSOptions. |
125 TestServer(const HTTPSOptions& https_options, | 120 TestServer(const HTTPSOptions& https_options, |
126 const FilePath& document_root); | 121 const FilePath& document_root); |
127 | 122 |
128 ~TestServer(); | 123 ~TestServer(); |
129 | 124 |
130 bool Start() WARN_UNUSED_RESULT; | 125 bool Start() WARN_UNUSED_RESULT; |
131 | 126 |
132 // Stop the server started by Start(). | 127 // Stop the server started by Start(). |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 217 |
223 // Enables logging of the server to the console. | 218 // Enables logging of the server to the console. |
224 bool log_to_console_; | 219 bool log_to_console_; |
225 | 220 |
226 DISALLOW_COPY_AND_ASSIGN(TestServer); | 221 DISALLOW_COPY_AND_ASSIGN(TestServer); |
227 }; | 222 }; |
228 | 223 |
229 } // namespace net | 224 } // namespace net |
230 | 225 |
231 #endif // NET_TEST_TEST_SERVER_H_ | 226 #endif // NET_TEST_TEST_SERVER_H_ |
OLD | NEW |