OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 24 matching lines...) Expand all Loading... |
35 // that can provide various responses useful for testing. | 35 // that can provide various responses useful for testing. |
36 class TestServer { | 36 class TestServer { |
37 public: | 37 public: |
38 typedef std::pair<std::string, std::string> StringPair; | 38 typedef std::pair<std::string, std::string> StringPair; |
39 | 39 |
40 enum Type { | 40 enum Type { |
41 TYPE_FTP, | 41 TYPE_FTP, |
42 TYPE_HTTP, | 42 TYPE_HTTP, |
43 TYPE_HTTPS, | 43 TYPE_HTTPS, |
44 TYPE_SYNC, | 44 TYPE_SYNC, |
| 45 TYPE_TCP_ECHO, |
| 46 TYPE_UDP_ECHO, |
45 }; | 47 }; |
46 | 48 |
47 // Container for various options to control how the HTTPS server is | 49 // Container for various options to control how the HTTPS server is |
48 // initialized. | 50 // initialized. |
49 struct HTTPSOptions { | 51 struct HTTPSOptions { |
50 enum ServerCertificate { | 52 enum ServerCertificate { |
51 CERT_OK, | 53 CERT_OK, |
52 CERT_MISMATCHED_NAME, | 54 CERT_MISMATCHED_NAME, |
53 CERT_EXPIRED, | 55 CERT_EXPIRED, |
54 }; | 56 }; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 202 |
201 // Has the server been started? | 203 // Has the server been started? |
202 bool started_; | 204 bool started_; |
203 | 205 |
204 DISALLOW_COPY_AND_ASSIGN(TestServer); | 206 DISALLOW_COPY_AND_ASSIGN(TestServer); |
205 }; | 207 }; |
206 | 208 |
207 } // namespace net | 209 } // namespace net |
208 | 210 |
209 #endif // NET_TEST_TEST_SERVER_H_ | 211 #endif // NET_TEST_TEST_SERVER_H_ |
OLD | NEW |