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 #include "net/test/spawned_test_server/local_test_server.h" | 5 #include "net/test/spawned_test_server/local_test_server.h" |
6 | 6 |
7 #include <poll.h> | 7 #include <poll.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/process_util.h" | 14 #include "base/process_util.h" |
15 #include "base/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "base/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/test/test_timeouts.h" | 17 #include "base/test/test_timeouts.h" |
18 #include "net/test/python_utils.h" | 18 #include "net/test/python_utils.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // Helper class used to detect and kill orphaned python test server processes. | 22 // Helper class used to detect and kill orphaned python test server processes. |
23 // Checks if the command line of a process contains |path_string| (the path | 23 // Checks if the command line of a process contains |path_string| (the path |
24 // from which the test server was launched) and |port_string| (the port used by | 24 // from which the test server was launched) and |port_string| (the port used by |
25 // the test server), and if the parent pid of the process is 1 (indicating that | 25 // the test server), and if the parent pid of the process is 1 (indicating that |
26 // it is an orphaned process). | 26 // it is an orphaned process). |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 168 |
169 if (!ParseServerData(server_data)) { | 169 if (!ParseServerData(server_data)) { |
170 LOG(ERROR) << "Could not parse server_data: " << server_data; | 170 LOG(ERROR) << "Could not parse server_data: " << server_data; |
171 return false; | 171 return false; |
172 } | 172 } |
173 | 173 |
174 return true; | 174 return true; |
175 } | 175 } |
176 | 176 |
177 } // namespace net | 177 } // namespace net |
OLD | NEW |