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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 // |document_root| must be a relative path under the root tree. | 22 // |document_root| must be a relative path under the root tree. |
23 RemoteTestServer(Type type, | 23 RemoteTestServer(Type type, |
24 const std::string& host, | 24 const std::string& host, |
25 const FilePath& document_root); | 25 const FilePath& document_root); |
26 | 26 |
27 // Initialize a HTTPS TestServer with a specific set of HTTPSOptions. | 27 // Initialize a HTTPS TestServer with a specific set of HTTPSOptions. |
28 // |document_root| must be a relative path under the root tree. | 28 // |document_root| must be a relative path under the root tree. |
29 RemoteTestServer(const HTTPSOptions& https_options, | 29 RemoteTestServer(const HTTPSOptions& https_options, |
30 const FilePath& document_root); | 30 const FilePath& document_root); |
31 | 31 |
32 ~RemoteTestServer(); | 32 virtual ~RemoteTestServer(); |
33 | 33 |
34 // 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. |
35 bool Start() WARN_UNUSED_RESULT; | 35 bool Start() WARN_UNUSED_RESULT; |
36 | 36 |
37 // 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. |
38 bool Stop(); | 38 bool Stop(); |
39 | 39 |
40 private: | 40 private: |
41 bool Init(const FilePath& document_root); | 41 bool Init(const FilePath& document_root); |
42 | 42 |
43 // Helper to start and stop instances of the Python test server that runs on | 43 // Helper to start and stop instances of the Python test server that runs on |
44 // the host machine. | 44 // the host machine. |
45 scoped_ptr<SpawnerCommunicator> spawner_communicator_; | 45 scoped_ptr<SpawnerCommunicator> spawner_communicator_; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(RemoteTestServer); | 47 DISALLOW_COPY_AND_ASSIGN(RemoteTestServer); |
48 }; | 48 }; |
49 | 49 |
50 } // namespace net | 50 } // namespace net |
51 | 51 |
52 #endif // NET_TEST_REMOTE_TEST_SERVER_H_ | 52 #endif // NET_TEST_REMOTE_TEST_SERVER_H_ |
53 | 53 |
OLD | NEW |