| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:io'; | 6 import 'dart:io'; |
| 7 | 7 |
| 8 @Timeout(const Duration(seconds: 60)) | 8 @Timeout(const Duration(seconds: 60)) |
| 9 import 'package:test/test.dart'; | 9 import 'package:test/test.dart'; |
| 10 import 'package:webdriver/webdriver.dart' show By, Capabilities, WebDriver; | 10 import 'package:webdriver/webdriver.dart' show By, Capabilities, WebDriver; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 defaultPort: 8080); | 81 defaultPort: 8080); |
| 82 } | 82 } |
| 83 | 83 |
| 84 const _webDriverManagerPath = './node_modules/.bin/webdriver-manager'; | 84 const _webDriverManagerPath = './node_modules/.bin/webdriver-manager'; |
| 85 Future<ChildServerProcess> _startSelenium() async { | 85 Future<ChildServerProcess> _startSelenium() async { |
| 86 var result = await Process.run(_webDriverManagerPath, ['update']); | 86 var result = await Process.run(_webDriverManagerPath, ['update']); |
| 87 if (result.exitCode != 0) { | 87 if (result.exitCode != 0) { |
| 88 throw new StateError('Webdriver update failed: ${result.stderr}'); | 88 throw new StateError('Webdriver update failed: ${result.stderr}'); |
| 89 } | 89 } |
| 90 return ChildServerProcess.build( | 90 return ChildServerProcess.build( |
| 91 (host, port) => Process.start( | 91 (host, port) => Process.start( |
| 92 _webDriverManagerPath, ['start', '--seleniumPort=$port'], | 92 _webDriverManagerPath, ['start', '--seleniumPort=$port'], |
| 93 mode: ProcessStartMode.DETACHED_WITH_STDIO), | 93 mode: ProcessStartMode.DETACHED_WITH_STDIO), |
| 94 defaultPort: 4444); | 94 defaultPort: 4444); |
| 95 } | 95 } |
| OLD | NEW |