OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // Client for secure_bad_certificate_test, that runs in a subprocess. | 5 // Client for secure_bad_certificate_test, that runs in a subprocess. |
6 // The test verifies that the client bad certificate callback works. | 6 // The test verifies that the client bad certificate callback works. |
7 | 7 |
8 import "dart:async"; | 8 import "dart:async"; |
9 import "dart:io"; | 9 import "dart:io"; |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 .then((SecureSocket socket) { | 30 .then((SecureSocket socket) { |
31 expect(false); | 31 expect(false); |
32 }, onError: (e) { | 32 }, onError: (e) { |
33 expect(e is HandshakeException || e is SocketException); | 33 expect(e is HandshakeException || e is SocketException); |
34 })); | 34 })); |
35 } | 35 } |
36 return Future.wait(testFutures); | 36 return Future.wait(testFutures); |
37 } | 37 } |
38 | 38 |
39 | 39 |
40 void main() { | 40 void main(List<String> args) { |
41 final args = new Options().arguments; | |
42 SecureSocket.initialize(); | 41 SecureSocket.initialize(); |
43 runClients(int.parse(args[0])) | 42 runClients(int.parse(args[0])) |
44 .then((_) => print('SUCCESS')); | 43 .then((_) => print('SUCCESS')); |
45 } | 44 } |
OLD | NEW |