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

Unified Diff: tests/standalone/io/https_unauthorized_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/https_unauthorized_test.dart
diff --git a/tests/standalone/io/https_unauthorized_test.dart b/tests/standalone/io/https_unauthorized_test.dart
index 6bded129ef1bc7910094987b4bb6ca086866e9cf..2c291dfc8614ccbeefed2de11b4e2028e152109a 100644
--- a/tests/standalone/io/https_unauthorized_test.dart
+++ b/tests/standalone/io/https_unauthorized_test.dart
@@ -25,18 +25,22 @@ String localFile(path) => Platform.script.resolve(path).toFilePath();
SecurityContext untrustedServerContext = new SecurityContext()
..useCertificateChain(localFile('certificates/untrusted_server_chain.pem'))
..usePrivateKey(localFile('certificates/untrusted_server_key.pem'),
- password: 'dartdart');
+ password: 'dartdart');
SecurityContext clientContext = new SecurityContext()
..setTrustedCertificates(localFile('certificates/trusted_certs.pem'));
Future<SecureServerSocket> runServer() {
- return HttpServer.bindSecure(
- HOST_NAME, 0, untrustedServerContext, backlog: 5)
- .then((server) {
+ return HttpServer
+ .bindSecure(HOST_NAME, 0, untrustedServerContext, backlog: 5)
+ .then((server) {
server.listen((HttpRequest request) {
- request.listen((_) { }, onDone: () { request.response.close(); });
- }, onError: (e) { if (e is! HandshakeException) throw e; });
+ request.listen((_) {}, onDone: () {
+ request.response.close();
+ });
+ }, onError: (e) {
+ if (e is! HandshakeException) throw e;
+ });
return server;
});
}
@@ -44,9 +48,9 @@ Future<SecureServerSocket> runServer() {
void main() {
var clientScript = localFile('https_unauthorized_client.dart');
Future clientProcess(int port) {
- return Process.run(Platform.executable,
- [clientScript, port.toString()])
- .then((ProcessResult result) {
+ return Process
+ .run(Platform.executable, [clientScript, port.toString()]).then(
+ (ProcessResult result) {
if (result.exitCode != 0 || !result.stdout.contains('SUCCESS')) {
print("Client failed");
print(" stdout:");

Powered by Google App Engine
This is Rietveld 408576698