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_REMOTE_TEST_SERVER_H_ | 5 #ifndef NET_TEST_REMOTE_TEST_SERVER_H_ |
6 #define NET_TEST_REMOTE_TEST_SERVER_H_ | 6 #define NET_TEST_REMOTE_TEST_SERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "net/test/base_test_server.h" | 10 #include "net/test/base_test_server.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 | 13 |
14 class SpawnerCommunicator; | 14 class SpawnerCommunicator; |
15 | 15 |
16 // The RemoteTestServer runs an external Python-based test server in another | 16 // The RemoteTestServer runs an external Python-based test server in another |
17 // machine that is different from the machine in which RemoteTestServer runs. | 17 // machine that is different from the machine in which RemoteTestServer runs. |
18 class RemoteTestServer : public BaseTestServer { | 18 class RemoteTestServer : public BaseTestServer { |
19 public: | 19 public: |
20 // Initialize a TestServer listening on a specific host (IP or hostname). | 20 // Initialize a TestServer listening on a specific host (IP or hostname). |
21 // |document_root| must be a relative path under the root tree. | 21 // |document_root| must be a relative path under the root tree. |
22 RemoteTestServer(Type type, | 22 RemoteTestServer(Type type, |
23 const std::string& host, | 23 const std::string& host, |
24 const FilePath& document_root); | 24 const FilePath& document_root); |
25 | 25 |
26 // Initialize a HTTPS TestServer with a specific set of HTTPSOptions. | 26 // Initialize a TestServer with a specific set of SSLOptions. |
27 // |document_root| must be a relative path under the root tree. | 27 // |document_root| must be a relative path under the root tree. |
28 RemoteTestServer(const HTTPSOptions& https_options, | 28 RemoteTestServer(Type type, |
| 29 const SSLOptions& ssl_options, |
29 const FilePath& document_root); | 30 const FilePath& document_root); |
30 | 31 |
31 virtual ~RemoteTestServer(); | 32 virtual ~RemoteTestServer(); |
32 | 33 |
33 // Starts the Python test server on the host, instead of on the device. | 34 // Starts the Python test server on the host, instead of on the device. |
34 bool Start() WARN_UNUSED_RESULT; | 35 bool Start() WARN_UNUSED_RESULT; |
35 | 36 |
36 // Stops the Python test server that is running on the host machine. | 37 // Stops the Python test server that is running on the host machine. |
37 bool Stop(); | 38 bool Stop(); |
38 | 39 |
(...skipping 10 matching lines...) Expand all Loading... |
49 // the host machine. | 50 // the host machine. |
50 scoped_ptr<SpawnerCommunicator> spawner_communicator_; | 51 scoped_ptr<SpawnerCommunicator> spawner_communicator_; |
51 | 52 |
52 DISALLOW_COPY_AND_ASSIGN(RemoteTestServer); | 53 DISALLOW_COPY_AND_ASSIGN(RemoteTestServer); |
53 }; | 54 }; |
54 | 55 |
55 } // namespace net | 56 } // namespace net |
56 | 57 |
57 #endif // NET_TEST_REMOTE_TEST_SERVER_H_ | 58 #endif // NET_TEST_REMOTE_TEST_SERVER_H_ |
58 | 59 |
OLD | NEW |