Index: utils/tests/testrunner/http_client_tests/http_client_test.dart |
diff --git a/utils/tests/testrunner/http_client_tests/http_client_test.dart b/utils/tests/testrunner/http_client_tests/http_client_test.dart |
index 452c1ab57b39a2493e12cb1b0d99f3e190f9e66c..0015eb43b85bb6a917d23632ee0769a52740998f 100644 |
--- a/utils/tests/testrunner/http_client_tests/http_client_test.dart |
+++ b/utils/tests/testrunner/http_client_tests/http_client_test.dart |
@@ -12,18 +12,17 @@ main() { |
var get = (String what, int code, String text) { |
var c = new Completer(); |
HttpClient client = new HttpClient(); |
- client.getUrl(Uri.parse("http://127.0.0.1:3456/$what")) |
- .then((HttpClientRequest request) { |
+ client |
+ .getUrl(Uri.parse("http://127.0.0.1:3456/$what")) |
+ .then((HttpClientRequest request) { |
// Prepare the request then call close on it to send it. |
return request.close(); |
- }) |
- .then((HttpClientResponse response) { |
+ }).then((HttpClientResponse response) { |
// Process the response. |
expect(response.statusCode, code); |
var sb = new StringBuffer(); |
- response.transform(UTF8.decoder) |
- .listen((data) { |
- sb.write(data); |
+ response.transform(UTF8.decoder).listen((data) { |
+ sb.write(data); |
}, onDone: () { |
expect(sb.toString(), text); |
c.complete(); |
@@ -38,4 +37,3 @@ main() { |
return get('fail.txt', 404, ""); |
}); |
} |
- |