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

Unified Diff: tests/standalone/io/http_reuse_server_port_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_reuse_server_port_test.dart
diff --git a/tests/standalone/io/http_reuse_server_port_test.dart b/tests/standalone/io/http_reuse_server_port_test.dart
index 4829eb7e03bcc951199be1e7c550a93a99f57b09..e5a35b2ef0a6cf81c005c9f1b2a602d4c5841179 100644
--- a/tests/standalone/io/http_reuse_server_port_test.dart
+++ b/tests/standalone/io/http_reuse_server_port_test.dart
@@ -26,13 +26,18 @@ Future<int> runServer(int port, int connections, bool clean) {
}
});
- Future.wait(new List.generate(connections, (_) {
+ Future
+ .wait(new List.generate(connections, (_) {
var client = new HttpClient();
- return client.get("127.0.0.1", server.port, "/")
+ return client
+ .get("127.0.0.1", server.port, "/")
.then((request) => request.close())
.then((response) => response.drain())
- .catchError((e) { if (clean) throw e; });
- })).then((_) {
+ .catchError((e) {
+ if (clean) throw e;
+ });
+ }))
+ .then((_) {
if (clean) {
int port = server.port;
server.close().then((_) => completer.complete(port));
@@ -42,7 +47,6 @@ Future<int> runServer(int port, int connections, bool clean) {
return completer.future;
}
-
void testReusePort() {
asyncStart();
runServer(0, 10, true).then((int port) {
@@ -55,7 +59,6 @@ void testReusePort() {
});
}
-
void testUncleanReusePort() {
asyncStart();
runServer(0, 10, false).then((int port) {
@@ -68,7 +71,6 @@ void testUncleanReusePort() {
});
}
-
void main() {
testReusePort();
testUncleanReusePort();

Powered by Google App Engine
This is Rietveld 408576698