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

Unified Diff: tests/standalone/io/socket_exception_test.dart

Issue 169383003: Make event-handlers edge-triggered and move socket-state to Dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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
« no previous file with comments | « tests/standalone/io/secure_builtin_roots_test.dart ('k') | tests/standalone/io/socket_info_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/socket_exception_test.dart
diff --git a/tests/standalone/io/socket_exception_test.dart b/tests/standalone/io/socket_exception_test.dart
index 6381558f72a01ddcb5df0e0a2e6c541d670bf636..58abb85cbec6aee0fd5c358261195b25902aaf66 100644
--- a/tests/standalone/io/socket_exception_test.dart
+++ b/tests/standalone/io/socket_exception_test.dart
@@ -40,6 +40,7 @@ class SocketExceptionTest {
asyncStart();
ServerSocket.bind("127.0.0.1", 0).then((server) {
Socket.connect("127.0.0.1", server.port).then((socket) {
+ socket.destroy();
server.close();
server.listen(
(incoming) => Expect.fail("Unexpected socket"),
@@ -53,8 +54,11 @@ class SocketExceptionTest {
ServerSocket.bind("127.0.0.1", 0).then((server) {
Socket.connect("127.0.0.1", server.port).then((socket) {
server.listen(
- (incoming) => server.close(),
- onDone: asyncEnd);
+ (incoming) {
+ incoming.destroy();
+ socket.destroy();
+ server.close();
+ }, onDone: asyncEnd);
});
});
}
« no previous file with comments | « tests/standalone/io/secure_builtin_roots_test.dart ('k') | tests/standalone/io/socket_info_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698