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_socket_test.dart

Issue 1721283002: Implements secure sockets on Mac OS with SecureTransport API (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 9 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_socket_test.dart
diff --git a/tests/standalone/io/secure_socket_test.dart b/tests/standalone/io/secure_socket_test.dart
index 1566b5a38a277866a8f4df72e91fbcc3b9a48b8b..bf128df0604d9c0373c5f0c5e8e3041ec30810f1 100644
--- a/tests/standalone/io/secure_socket_test.dart
+++ b/tests/standalone/io/secure_socket_test.dart
@@ -50,6 +50,7 @@ Future<HttpServer> startServer(String certType, String password) {
Future test(String certType, String password) {
List<int> body = <int>[];
+ Completer completer = new Completer();
startServer(certType, password).then((server) {
SecureSocket.connect(
"localhost", server.port, context: clientContext(certType, password))
@@ -65,14 +66,17 @@ Future test(String certType, String password) {
Expect.equals(72, body[0]);
Expect.equals(9, body[body.length - 1]);
server.close();
+ completer.complete(null);
},
onError: (e, trace) {
String msg = "Unexpected error $e";
if (trace != null) msg += "\nStackTrace: $trace";
Expect.fail(msg);
+ completer.complete(null);
});
});
});
+ return completer.future;
}
main() async {
« no previous file with comments | « tests/standalone/io/secure_socket_alpn_test.dart ('k') | tests/standalone/io/security_context_argument_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698