Fix three missing return warnings.
Change-Id: I69c5684a40bf46ac6a2b1ed304ea593b9d073922
Reviewed-on: https://dart-review.googlesource.com/68381
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/analyzer_plugin/test/integration/support/integration_tests.dart b/pkg/analyzer_plugin/test/integration/support/integration_tests.dart
index 1756d72..52740b2 100644
--- a/pkg/analyzer_plugin/test/integration/support/integration_tests.dart
+++ b/pkg/analyzer_plugin/test/integration/support/integration_tests.dart
@@ -951,7 +951,5 @@
* Create a [MismatchDescriber] describing a mismatch with a simple string.
*/
MismatchDescriber simpleDescription(String description) =>
- (Description mismatchDescription) {
- mismatchDescription.add(description);
- };
+ (Description mismatchDescription) => mismatchDescription.add(description);
}
diff --git a/tools/testing/dart/browser_controller.dart b/tools/testing/dart/browser_controller.dart
index c8daae9..03ee0a9 100644
--- a/tools/testing/dart/browser_controller.dart
+++ b/tools/testing/dart/browser_controller.dart
@@ -1362,13 +1362,12 @@
} else {
textResponse = new Future<String>.value("");
}
- request.response.done.catchError((error) {
+ request.response.done.catchError((error) async {
if (!underTermination) {
- return textResponse.then((String text) {
- print("URI ${request.uri}");
- print("textResponse $textResponse");
- throw "Error returning content to browser: $error";
- });
+ String text = await textResponse;
+ print("URI ${request.uri}");
+ print("text $text");
+ throw "Error returning content to browser: $error";
}
});
textResponse.then((String text) async {
diff --git a/tools/testing/dart/command.dart b/tools/testing/dart/command.dart
index 2c4d120..5b13728 100644
--- a/tools/testing/dart/command.dart
+++ b/tools/testing/dart/command.dart
@@ -656,7 +656,7 @@
var link = new io.Link(_link);
return link.exists().then((bool exists) {
- if (exists) return link.delete();
+ if (exists) link.deleteSync();
}).then((_) => link.create(_target));
}).then((_) {
return new ScriptCommandOutput(this, Expectation.pass, "", watch.elapsed);