| Index: tests/standalone/io/http_connection_info_test.dart
|
| diff --git a/tests/standalone/io/http_connection_info_test.dart b/tests/standalone/io/http_connection_info_test.dart
|
| index e503803b4b52722cdbfbc408454583dca7335ff8..81199ddd0342db5c0230ad402a5d1e71b86a6a6b 100644
|
| --- a/tests/standalone/io/http_connection_info_test.dart
|
| +++ b/tests/standalone/io/http_connection_info_test.dart
|
| @@ -18,31 +18,26 @@ void testHttpConnectionInfo() {
|
| Expect.isNotNull(clientPort);
|
| Expect.equals(request.connectionInfo.remotePort, clientPort);
|
| Expect.equals(response.connectionInfo.remotePort, clientPort);
|
| - request.listen(
|
| - (_) { },
|
| - onDone: () { request.response.close(); });
|
| + request.listen((_) {}, onDone: () {
|
| + request.response.close();
|
| + });
|
| });
|
|
|
| HttpClient client = new HttpClient();
|
| - client.get("127.0.0.1", server.port, "/")
|
| - .then((request) {
|
| - Expect.isTrue(
|
| - request.connectionInfo.remoteAddress is InternetAddress);
|
| - Expect.equals(request.connectionInfo.remotePort, server.port);
|
| - clientPort = request.connectionInfo.localPort;
|
| - return request.close();
|
| - })
|
| - .then((response) {
|
| - Expect.equals(server.port, response.connectionInfo.remotePort);
|
| - Expect.equals(clientPort, response.connectionInfo.localPort);
|
| - response.listen(
|
| - (_) { },
|
| - onDone: () {
|
| - client.close();
|
| - server.close();
|
| - });
|
| - });
|
| + client.get("127.0.0.1", server.port, "/").then((request) {
|
| + Expect.isTrue(request.connectionInfo.remoteAddress is InternetAddress);
|
| + Expect.equals(request.connectionInfo.remotePort, server.port);
|
| + clientPort = request.connectionInfo.localPort;
|
| + return request.close();
|
| + }).then((response) {
|
| + Expect.equals(server.port, response.connectionInfo.remotePort);
|
| + Expect.equals(clientPort, response.connectionInfo.localPort);
|
| + response.listen((_) {}, onDone: () {
|
| + client.close();
|
| + server.close();
|
| + });
|
| });
|
| + });
|
| }
|
|
|
| void main() {
|
|
|