Chromium Code Reviews| Index: tools/testing/dart/test_runner.dart |
| diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart |
| index 994110e65ebc076b0d46ead89780e4538b3134f3..4d8917b3dfa2e99ea71a636271e7b55686b6f71e 100644 |
| --- a/tools/testing/dart/test_runner.dart |
| +++ b/tools/testing/dart/test_runner.dart |
| @@ -750,19 +750,21 @@ class BatchRunnerProcess { |
| Future terminate() { |
| if (_process == null) return new Future.immediate(true); |
| Completer completer = new Completer(); |
| + Timer killTimer; |
| _process.onExit = (exitCode) { |
| _process.close(); |
| + if (killTimer != null) killTimer.cancel(); |
| completer.complete(true); |
| }; |
| - if (_isWebDriver && Platform.operatingSystem == 'windows') { |
| + if (_isWebDriver) { |
| // Use a graceful shutdown so our Selenium script can close |
| - // the open browser processes. TODO(jmesserly): Send a signal once |
| - // that's supported in Windows. |
| + // the open browser processes. On Windows, signals do not exist |
|
Jennifer Messerly
2012/10/09 17:54:56
I'm confused by this comment. See: http://msdn.mic
Emily Fortuna
2012/10/09 18:01:41
It does http://docs.python.org/library/subprocess.
|
| + // and a kill is a hard kill. |
| _process.stdin.write('--terminate\n'.charCodes()); |
| // In case the run_selenium process didn't close, kill it after 30s |
| int shutdownMillisecs = 30000; |
| - new Timer(shutdownMillisecs, (e) { if (!closed) _process.kill(); }); |
| + killTimer = new Timer(shutdownMillisecs, (e) { _process.kill(); }); |
| } else { |
| _process.kill(); |
| } |