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

Unified Diff: tests/standalone/io/http_response_deadline_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_response_deadline_test.dart
diff --git a/tests/standalone/io/http_response_deadline_test.dart b/tests/standalone/io/http_response_deadline_test.dart
index 5ec6a322f7f3923a2c159007041e8106c8d58031..522dbbbf8cf260fb15cd96e858c97d97695f2025 100644
--- a/tests/standalone/io/http_response_deadline_test.dart
+++ b/tests/standalone/io/http_response_deadline_test.dart
@@ -22,7 +22,8 @@ void testSimpleDeadline(int connections) {
var futures = [];
var client = new HttpClient();
for (int i = 0; i < connections; i++) {
- futures.add(client.get('localhost', server.port, '/')
+ futures.add(client
+ .get('localhost', server.port, '/')
.then((request) => request.close())
.then((response) => response.drain()));
}
@@ -41,14 +42,15 @@ void testExceedDeadline(int connections) {
var futures = [];
var client = new HttpClient();
for (int i = 0; i < connections; i++) {
- futures.add(client.get('localhost', server.port, '/')
+ futures.add(client
+ .get('localhost', server.port, '/')
.then((request) => request.close())
.then((response) => response.drain())
.then((_) {
- Expect.fail("Expected error");
- }, onError: (e) {
- // Expect error.
- }));
+ Expect.fail("Expected error");
+ }, onError: (e) {
+ // Expect error.
+ }));
}
Future.wait(futures).then((_) => server.close());
});
@@ -72,15 +74,16 @@ void testDeadlineAndDetach(int connections) {
var futures = [];
var client = new HttpClient();
for (int i = 0; i < connections; i++) {
- futures.add(client.get('localhost', server.port, '/')
+ futures.add(client
+ .get('localhost', server.port, '/')
.then((request) => request.close())
.then((response) {
- return response.fold(new BytesBuilder(), (b, d) => b..add(d))
- .then((builder) {
- Expect.equals('stuff',
- new String.fromCharCodes(builder.takeBytes()));
- });
- }));
+ return response
+ .fold(new BytesBuilder(), (b, d) => b..add(d))
+ .then((builder) {
+ Expect.equals('stuff', new String.fromCharCodes(builder.takeBytes()));
+ });
+ }));
}
Future.wait(futures).then((_) => server.close());
});
@@ -91,4 +94,3 @@ void main() {
testExceedDeadline(10);
testDeadlineAndDetach(10);
}
-

Powered by Google App Engine
This is Rietveld 408576698