| 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 // OtherResources=certificates/server_chain.pem |
| 10 // OtherResources=certificates/server_key.pem |
| 11 // OtherResources=certificates/trusted_certs.pem |
| 9 | 12 |
| 10 import "package:expect/expect.dart"; | 13 import "package:expect/expect.dart"; |
| 11 import "package:path/path.dart"; | 14 import "package:path/path.dart"; |
| 12 import "dart:async"; | 15 import "dart:async"; |
| 13 import "dart:io"; | 16 import "dart:io"; |
| 14 import "dart:isolate"; | 17 import "dart:isolate"; |
| 15 | 18 |
| 16 String localFile(path) => Platform.script.resolve(path).toFilePath(); | 19 String localFile(path) => Platform.script.resolve(path).toFilePath(); |
| 17 | 20 |
| 18 SecurityContext serverContext = new SecurityContext() | 21 SecurityContext serverContext = new SecurityContext() |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 server.close(); | 67 server.close(); |
| 65 break; | 68 break; |
| 66 default: throw "Unexpected event $event"; | 69 default: throw "Unexpected event $event"; |
| 67 } | 70 } |
| 68 }, onError: (e, trace) { | 71 }, onError: (e, trace) { |
| 69 String msg = "onError handler of RawSecureSocket stream hit $e"; | 72 String msg = "onError handler of RawSecureSocket stream hit $e"; |
| 70 if (trace != null) msg += "\nStackTrace: $trace"; | 73 if (trace != null) msg += "\nStackTrace: $trace"; |
| 71 Expect.fail(msg); | 74 Expect.fail(msg); |
| 72 }); | 75 }); |
| 73 } | 76 } |
| OLD | NEW |