Index: tests/standalone/io/http_requested_uri_test.dart |
diff --git a/tests/standalone/io/http_requested_uri_test.dart b/tests/standalone/io/http_requested_uri_test.dart |
index 03db1083d633eec095fe737dbc78a429183d8bfd..8718c5f7b4439cff24b1d8a22e2130ccdabad834 100644 |
--- a/tests/standalone/io/http_requested_uri_test.dart |
+++ b/tests/standalone/io/http_requested_uri_test.dart |
@@ -15,31 +15,30 @@ void test(String expected, Map headers) { |
HttpServer.bind("localhost", 0).then((server) { |
expected = expected.replaceAll('%PORT', server.port.toString()); |
server.listen((request) { |
- Expect.equals("$expected$expectedPath", |
- request.requestedUri.toString()); |
+ Expect.equals("$expected$expectedPath", request.requestedUri.toString()); |
request.response.close(); |
}); |
HttpClient client = new HttpClient(); |
- client.get("localhost", server.port, sendPath) |
- .then((request) { |
- for (var v in headers.keys) { |
- if (headers[v] != null) { |
- request.headers.set(v, headers[v]); |
- } else { |
- request.headers.removeAll(v); |
+ client |
+ .get("localhost", server.port, sendPath) |
+ .then((request) { |
+ for (var v in headers.keys) { |
+ if (headers[v] != null) { |
+ request.headers.set(v, headers[v]); |
+ } else { |
+ request.headers.removeAll(v); |
+ } |
} |
- } |
- return request.close(); |
- }) |
- .then((response) => response.drain()) |
- .then((_) { |
- server.close(); |
- asyncEnd(); |
- }); |
+ return request.close(); |
+ }) |
+ .then((response) => response.drain()) |
+ .then((_) { |
+ server.close(); |
+ asyncEnd(); |
+ }); |
}); |
} |
- |
void main() { |
test('http://localhost:%PORT', {}); |
test('https://localhost:%PORT', {'x-forwarded-proto': 'https'}); |
@@ -47,4 +46,3 @@ void main() { |
test('http://my-host:321', {'x-forwarded-host': 'my-host:321'}); |
test('http://localhost:%PORT', {'host': null}); |
} |
- |