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

Unified Diff: tests/standalone/io/web_socket_pipe_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/web_socket_pipe_test.dart
diff --git a/tests/standalone/io/web_socket_pipe_test.dart b/tests/standalone/io/web_socket_pipe_test.dart
index 5439e8a9aafbee0212158040e7c7879adbc156f0..7705c34c187dd39ad6965ccbc02f013ac46e06fd 100644
--- a/tests/standalone/io/web_socket_pipe_test.dart
+++ b/tests/standalone/io/web_socket_pipe_test.dart
@@ -12,20 +12,20 @@ import "dart:async";
import "dart:io";
createReverseStringTransformer() {
- return new StreamTransformer.fromHandlers(
- handleData: (String data, sink) {
- var sb = new StringBuffer();
- for (int i = data.length - 1; i >= 0; i--) sb.write(data[i]);
- sink.add(sb.toString());
- });
+ return new StreamTransformer.fromHandlers(handleData: (String data, sink) {
+ var sb = new StringBuffer();
+ for (int i = data.length - 1; i >= 0; i--) sb.write(data[i]);
+ sink.add(sb.toString());
+ });
}
testPipe({int messages, bool transform}) {
HttpServer.bind("127.0.0.1", 0).then((server) {
server.listen((request) {
WebSocketTransformer.upgrade(request).then((websocket) {
- (transform ? websocket.transform(createReverseStringTransformer())
- : websocket)
+ (transform
+ ? websocket.transform(createReverseStringTransformer())
+ : websocket)
.pipe(websocket)
.then((_) => server.close());
});
@@ -40,17 +40,15 @@ testPipe({int messages, bool transform}) {
}
}
- client.listen(
- (data) {
- count++;
- if (transform) {
- Expect.equals("olleH", data);
- } else {
- Expect.equals("Hello", data);
- }
- next();
- },
- onDone: () => print("Client received close"));
+ client.listen((data) {
+ count++;
+ if (transform) {
+ Expect.equals("olleH", data);
+ } else {
+ Expect.equals("Hello", data);
+ }
+ next();
+ }, onDone: () => print("Client received close"));
next();
});

Powered by Google App Engine
This is Rietveld 408576698