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

Unified Diff: tests/standalone/io/secure_client_raw_server_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/secure_client_raw_server_test.dart
diff --git a/tests/standalone/io/secure_client_raw_server_test.dart b/tests/standalone/io/secure_client_raw_server_test.dart
index 20f7a3ff05ebd96169375b48d43dc8c82c0c4a98..0f13169776239d48fc12a3f728b5bab682d622df 100644
--- a/tests/standalone/io/secure_client_raw_server_test.dart
+++ b/tests/standalone/io/secure_client_raw_server_test.dart
@@ -21,16 +21,14 @@ String localFile(path) => Platform.script.resolve(path).toFilePath();
SecurityContext serverContext = new SecurityContext()
..useCertificateChain(localFile('certificates/server_chain.pem'))
..usePrivateKey(localFile('certificates/server_key.pem'),
- password: 'dartdart');
+ password: 'dartdart');
SecurityContext clientContext = new SecurityContext()
..setTrustedCertificates(localFile('certificates/trusted_certs.pem'));
InternetAddress HOST;
Future<RawSecureServerSocket> startEchoServer() {
- return RawSecureServerSocket.bind(HOST,
- 0,
- serverContext).then((server) {
+ return RawSecureServerSocket.bind(HOST, 0, serverContext).then((server) {
server.listen((RawSecureSocket client) {
List<List<int>> readChunks = <List<int>>[];
List<int> dataToWrite = null;
@@ -72,27 +70,28 @@ Future<RawSecureServerSocket> startEchoServer() {
Future testClient(server) {
Completer success = new Completer();
List<String> chunks = <String>[];
- SecureSocket.connect(HOST, server.port, context: clientContext)
- .then((socket) {
+ SecureSocket
+ .connect(HOST, server.port, context: clientContext)
+ .then((socket) {
socket.write("Hello server.");
socket.close();
- socket.listen(
- (List<int> data) {
- var received = new String.fromCharCodes(data);
- chunks.add(received);
- },
- onDone: () {
- String reply = chunks.join();
- Expect.equals("Hello server.", reply);
- success.complete(server);
- });
+ socket.listen((List<int> data) {
+ var received = new String.fromCharCodes(data);
+ chunks.add(received);
+ }, onDone: () {
+ String reply = chunks.join();
+ Expect.equals("Hello server.", reply);
+ success.complete(server);
+ });
});
return success.future;
}
void main() {
asyncStart();
- InternetAddress.lookup("localhost").then((hosts) => HOST = hosts.first)
+ InternetAddress
+ .lookup("localhost")
+ .then((hosts) => HOST = hosts.first)
.then((_) => startEchoServer())
.then(testClient)
.then((server) => server.close())

Powered by Google App Engine
This is Rietveld 408576698