| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <vector> | 10 #include <vector> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 const FilePath& document_root); | 106 const FilePath& document_root); |
| 107 | 107 |
| 108 ~TestServer(); | 108 ~TestServer(); |
| 109 | 109 |
| 110 bool Start() WARN_UNUSED_RESULT; | 110 bool Start() WARN_UNUSED_RESULT; |
| 111 | 111 |
| 112 // Stop the server started by Start(). | 112 // Stop the server started by Start(). |
| 113 bool Stop(); | 113 bool Stop(); |
| 114 | 114 |
| 115 const FilePath& document_root() const { return document_root_; } | 115 const FilePath& document_root() const { return document_root_; } |
| 116 const HostPortPair& host_port_pair() const { return host_port_pair_; } | 116 const HostPortPair& host_port_pair() const; |
| 117 std::string GetScheme() const; | 117 std::string GetScheme() const; |
| 118 bool GetAddressList(AddressList* address_list) const WARN_UNUSED_RESULT; | 118 bool GetAddressList(AddressList* address_list) const WARN_UNUSED_RESULT; |
| 119 | 119 |
| 120 GURL GetURL(const std::string& path); | 120 GURL GetURL(const std::string& path); |
| 121 | 121 |
| 122 GURL GetURLWithUser(const std::string& path, | 122 GURL GetURLWithUser(const std::string& path, |
| 123 const std::string& user); | 123 const std::string& user); |
| 124 | 124 |
| 125 GURL GetURLWithUserAndPassword(const std::string& path, | 125 GURL GetURLWithUserAndPassword(const std::string& path, |
| 126 const std::string& user, | 126 const std::string& user, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 // If |type_| is TYPE_HTTPS, the TLS settings to use for the test server. | 183 // If |type_| is TYPE_HTTPS, the TLS settings to use for the test server. |
| 184 HTTPSOptions https_options_; | 184 HTTPSOptions https_options_; |
| 185 | 185 |
| 186 #if defined(USE_NSS) | 186 #if defined(USE_NSS) |
| 187 scoped_refptr<X509Certificate> cert_; | 187 scoped_refptr<X509Certificate> cert_; |
| 188 #endif | 188 #endif |
| 189 | 189 |
| 190 Type type_; | 190 Type type_; |
| 191 | 191 |
| 192 // Has the server been started? |
| 193 bool started_; |
| 194 |
| 192 DISALLOW_COPY_AND_ASSIGN(TestServer); | 195 DISALLOW_COPY_AND_ASSIGN(TestServer); |
| 193 }; | 196 }; |
| 194 | 197 |
| 195 } // namespace net | 198 } // namespace net |
| 196 | 199 |
| 197 #endif // NET_TEST_TEST_SERVER_H_ | 200 #endif // NET_TEST_TEST_SERVER_H_ |
| OLD | NEW |