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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 | 51 |
52 private: | 52 private: |
53 bool Init(const FilePath& document_root); | 53 bool Init(const FilePath& document_root); |
54 | 54 |
55 // Launches the Python test server. Returns true on success. | 55 // Launches the Python test server. Returns true on success. |
56 bool LaunchPython(const FilePath& testserver_path) WARN_UNUSED_RESULT; | 56 bool LaunchPython(const FilePath& testserver_path) WARN_UNUSED_RESULT; |
57 | 57 |
58 // Waits for the server to start. Returns true on success. | 58 // Waits for the server to start. Returns true on success. |
59 bool WaitToStart() WARN_UNUSED_RESULT; | 59 bool WaitToStart() WARN_UNUSED_RESULT; |
60 | 60 |
61 // Add the command line arguments for the Python test server to | 61 // Add the command line arguments for the Python test server |
62 // |command_line|. Return true on success. | 62 // |testserver_path| to |command_line|. Return true on success. |
Ryan Sleevi
2012/04/18 00:45:02
This comment is no longer accurate.
While I reali
mattm
2012/08/03 19:41:03
Done.
| |
63 bool AddCommandLineArguments(CommandLine* command_line) const; | 63 bool AddCommandLineArguments(const FilePath& testserver_path, |
64 CommandLine* command_line) const; | |
64 | 65 |
65 // Handle of the Python process running the test server. | 66 // Handle of the Python process running the test server. |
66 base::ProcessHandle process_handle_; | 67 base::ProcessHandle process_handle_; |
67 | 68 |
68 #if defined(OS_WIN) | 69 #if defined(OS_WIN) |
69 // JobObject used to clean up orphaned child processes. | 70 // JobObject used to clean up orphaned child processes. |
70 base::win::ScopedHandle job_handle_; | 71 base::win::ScopedHandle job_handle_; |
71 | 72 |
72 // The pipe file handle we read from. | 73 // The pipe file handle we read from. |
73 base::win::ScopedHandle child_read_fd_; | 74 base::win::ScopedHandle child_read_fd_; |
74 | 75 |
75 // The pipe file handle the child and we write to. | 76 // The pipe file handle the child and we write to. |
76 base::win::ScopedHandle child_write_fd_; | 77 base::win::ScopedHandle child_write_fd_; |
77 #endif | 78 #endif |
78 | 79 |
79 #if defined(OS_POSIX) | 80 #if defined(OS_POSIX) |
80 // The file descriptor the child writes to when it starts. | 81 // The file descriptor the child writes to when it starts. |
81 int child_fd_; | 82 int child_fd_; |
82 file_util::ScopedFD child_fd_closer_; | 83 file_util::ScopedFD child_fd_closer_; |
83 #endif | 84 #endif |
84 | 85 |
85 DISALLOW_COPY_AND_ASSIGN(LocalTestServer); | 86 DISALLOW_COPY_AND_ASSIGN(LocalTestServer); |
86 }; | 87 }; |
87 | 88 |
88 } // namespace net | 89 } // namespace net |
89 | 90 |
90 #endif // NET_TEST_LOCAL_TEST_SERVER_H_ | 91 #endif // NET_TEST_LOCAL_TEST_SERVER_H_ |
OLD | NEW |