| 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 // VMOptions= | 5 // VMOptions= |
| 6 // VMOptions=--short_socket_read | 6 // VMOptions=--short_socket_read |
| 7 // VMOptions=--short_socket_write | 7 // VMOptions=--short_socket_write |
| 8 // VMOptions=--short_socket_read --short_socket_write | 8 // VMOptions=--short_socket_read --short_socket_write |
| 9 | 9 |
| 10 import "dart:async"; | 10 import "dart:async"; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 Expect.isTrue(e is HandshakeException); | 151 Expect.isTrue(e is HandshakeException); |
| 152 }) | 152 }) |
| 153 .whenComplete(server.close); | 153 .whenComplete(server.close); |
| 154 }); | 154 }); |
| 155 return connectClient(server.port, hostnameInConnect).then(runClient); | 155 return connectClient(server.port, hostnameInConnect).then(runClient); |
| 156 }); | 156 }); |
| 157 } | 157 } |
| 158 | 158 |
| 159 | 159 |
| 160 main() { | 160 main() { |
| 161 String certificateDatabase = Platform.script.resolve('pkcert').toFilePath(); | |
| 162 SecureSocket.initialize(database: certificateDatabase, | |
| 163 password: 'dartdart', | |
| 164 useBuiltinRoots: false); | |
| 165 asyncStart(); | 161 asyncStart(); |
| 166 InternetAddress.lookup("localhost").then((hosts) { | 162 InternetAddress.lookup("localhost").then((hosts) { |
| 167 HOST = hosts.first; | 163 HOST = hosts.first; |
| 168 return Future.wait([test(false), test(true)]); | 164 return Future.wait([test(false), test(true)]); |
| 169 }).then((_) => asyncEnd()); | 165 }).then((_) => asyncEnd()); |
| 170 } | 166 } |
| OLD | NEW |