OLD | NEW |
---|---|
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library test.runner.browser.chrome; | 5 library test.runner.browser.chrome; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:convert'; | 8 import 'dart:convert'; |
9 import 'dart:io'; | 9 import 'dart:io'; |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 "--user-data-dir=$dir", | 54 "--user-data-dir=$dir", |
55 url.toString(), | 55 url.toString(), |
56 "--disable-extensions", | 56 "--disable-extensions", |
57 "--disable-popup-blocking", | 57 "--disable-popup-blocking", |
58 "--bwsi", | 58 "--bwsi", |
59 "--no-first-run", | 59 "--no-first-run", |
60 "--no-default-browser-check", | 60 "--no-default-browser-check", |
61 "--disable-default-apps", | 61 "--disable-default-apps", |
62 "--disable-translate" | 62 "--disable-translate" |
63 ]).then((process) { | 63 ]).then((process) { |
64 process.stdout.listen(stdout.add); | |
65 process.stderr.listen(stderr.add); | |
kevmoo
2015/04/18 00:33:43
oops?
nweiz
2015/04/18 00:36:11
Done.
| |
64 _process = process; | 66 _process = process; |
65 _onProcessStartedCompleter.complete(); | 67 _onProcessStartedCompleter.complete(); |
66 | 68 |
67 // TODO(nweiz): the browser's standard output is almost always useless | 69 // TODO(nweiz): the browser's standard output is almost always useless |
68 // noise, but we should allow the user to opt in to seeing it. | 70 // noise, but we should allow the user to opt in to seeing it. |
69 return _process.exitCode; | 71 return _process.exitCode; |
70 }); | 72 }); |
71 }).then((exitCode) { | 73 }).then((exitCode) { |
72 if (exitCode == 0) return null; | 74 if (exitCode == 0) return null; |
73 | 75 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
112 | 114 |
113 var path = p.join(prefix, suffix); | 115 var path = p.join(prefix, suffix); |
114 if (new File(p.join(prefix, suffix)).existsSync()) return path; | 116 if (new File(p.join(prefix, suffix)).existsSync()) return path; |
115 } | 117 } |
116 | 118 |
117 // Fall back on looking it up on the path. This probably won't work, but at | 119 // Fall back on looking it up on the path. This probably won't work, but at |
118 // least it will fail with a useful error message. | 120 // least it will fail with a useful error message. |
119 return "chrome.exe"; | 121 return "chrome.exe"; |
120 } | 122 } |
121 } | 123 } |
OLD | NEW |