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

Unified Diff: tests/standalone/io/http_requested_uri_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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
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});
}
-

Powered by Google App Engine
This is Rietveld 408576698