Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Unified Diff: tools/testing/dart/android.dart

Issue 2863253002: Tighten up a bunch of types in test.dart. (Closed)
Patch Set: Merge branch 'master' into types-for-test Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/testing/dart/browser_controller.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/android.dart
diff --git a/tools/testing/dart/android.dart b/tools/testing/dart/android.dart
index 038068302799cf2773338f91aaefc0db1b673663..1debd45a2db9e00d3a0d1e74c0f6c1f0162882d4 100644
--- a/tools/testing/dart/android.dart
+++ b/tools/testing/dart/android.dart
@@ -145,7 +145,7 @@ class AndroidEmulator {
}
Future<bool> kill() {
- var completer = new Completer();
+ var completer = new Completer<bool>();
if (_emulatorProcess.kill()) {
_emulatorProcess.exitCode.then((exitCode) {
// TODO: Should we use exitCode to do something clever?
@@ -209,22 +209,22 @@ class AdbDevice {
* Polls the 'sys.boot_completed' property. Returns as soon as the property is
* 1.
*/
- Future waitForBootCompleted() async {
+ Future<Null> waitForBootCompleted() async {
while (true) {
try {
AdbCommandResult result =
await _adbCommand(['shell', 'getprop', 'sys.boot_completed']);
if (result.stdout.trim() == '1') return;
} catch (_) {}
- await new Future.delayed(const Duration(seconds: 2));
+ await new Future<Null>.delayed(const Duration(seconds: 2));
}
}
/**
* Put adb in root mode.
*/
- Future adbRoot() {
- var adbRootCompleter = new Completer();
+ Future<bool> adbRoot() {
+ var adbRootCompleter = new Completer<bool>();
_adbCommand(['root']).then((_) {
// TODO: Figure out a way to wait until the adb daemon was restarted in
// 'root mode' on the device.
@@ -435,7 +435,7 @@ class AdbDevicePool {
if (_idleDevices.length > 0) {
return _idleDevices.removeFirst();
} else {
- var completer = new Completer();
+ var completer = new Completer<AdbDevice>();
_waiter.add(completer);
return completer.future;
}
« no previous file with comments | « no previous file | tools/testing/dart/browser_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698