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_LOCAL_TEST_SERVER_H_ | 5 #ifndef NET_TEST_LOCAL_TEST_SERVER_H_ |
6 #define NET_TEST_LOCAL_TEST_SERVER_H_ | 6 #define NET_TEST_LOCAL_TEST_SERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 21 matching lines...) Expand all Loading... | |
32 // Initialize a TestServer with a specific set of SSLOptions. | 32 // Initialize a TestServer with a specific set of SSLOptions. |
33 // |document_root| must be a relative path under the root tree. | 33 // |document_root| must be a relative path under the root tree. |
34 LocalTestServer(Type type, | 34 LocalTestServer(Type type, |
35 const SSLOptions& ssl_options, | 35 const SSLOptions& ssl_options, |
36 const FilePath& document_root); | 36 const FilePath& document_root); |
37 | 37 |
38 virtual ~LocalTestServer(); | 38 virtual ~LocalTestServer(); |
39 | 39 |
40 bool Start() WARN_UNUSED_RESULT; | 40 bool Start() WARN_UNUSED_RESULT; |
41 | 41 |
42 bool StartInBackground() WARN_UNUSED_RESULT; | |
Paweł Hajdan Jr.
2013/01/24 01:39:35
Please add comments, including for Start method.
dmichael (off chromium)
2013/01/24 18:59:40
Ah, I should have done that automatically. Thanks,
| |
43 bool BlockUntilStarted() WARN_UNUSED_RESULT; | |
44 | |
42 // Stop the server started by Start(). | 45 // Stop the server started by Start(). |
43 bool Stop(); | 46 bool Stop(); |
44 | 47 |
45 // Modify PYTHONPATH to contain libraries we need. | 48 // Modify PYTHONPATH to contain libraries we need. |
46 virtual bool SetPythonPath() const WARN_UNUSED_RESULT; | 49 virtual bool SetPythonPath() const WARN_UNUSED_RESULT; |
47 | 50 |
48 // This is a static version so that RunSyncTest in run_testserver.cc can use | 51 // This is a static version so that RunSyncTest in run_testserver.cc can use |
49 // it. | 52 // it. |
50 // TODO(mattm): We should refactor so this isn't necessary (crbug.com/159731). | 53 // TODO(mattm): We should refactor so this isn't necessary (crbug.com/159731). |
51 static bool SetPythonPathStatic() WARN_UNUSED_RESULT; | 54 static bool SetPythonPathStatic() WARN_UNUSED_RESULT; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 int child_fd_; | 99 int child_fd_; |
97 file_util::ScopedFD child_fd_closer_; | 100 file_util::ScopedFD child_fd_closer_; |
98 #endif | 101 #endif |
99 | 102 |
100 DISALLOW_COPY_AND_ASSIGN(LocalTestServer); | 103 DISALLOW_COPY_AND_ASSIGN(LocalTestServer); |
101 }; | 104 }; |
102 | 105 |
103 } // namespace net | 106 } // namespace net |
104 | 107 |
105 #endif // NET_TEST_LOCAL_TEST_SERVER_H_ | 108 #endif // NET_TEST_LOCAL_TEST_SERVER_H_ |
OLD | NEW |