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

Side by Side Diff: tests/standalone/io/socket_exception_test.dart

Issue 14864009: Keep track of when a socket has been destroyed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove delete_handle marker. Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/standalone/io/raw_socket_typed_data_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Tests socket exceptions. 5 // Tests socket exceptions.
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import "dart:async"; 8 import "dart:async";
9 import "dart:isolate"; 9 import "dart:isolate";
10 import "dart:io"; 10 import "dart:io";
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 Socket.connect("127.0.0.1", server.port).then((client) { 111 Socket.connect("127.0.0.1", server.port).then((client) {
112 client.listen((data) {}, onDone: server.close); 112 client.listen((data) {}, onDone: server.close);
113 client.destroy(); 113 client.destroy();
114 }); 114 });
115 }); 115 });
116 } 116 }
117 117
118 static void clientSocketAddDestroyNoErrorTest() { 118 static void clientSocketAddDestroyNoErrorTest() {
119 ServerSocket.bind("127.0.0.1", 0).then((server) { 119 ServerSocket.bind("127.0.0.1", 0).then((server) {
120 server.listen((socket) { 120 server.listen((socket) {
121 // Passive block data by not sobscribing to socket. 121 // Passive block data by not subscribing to socket.
122 }); 122 });
123 Socket.connect("127.0.0.1", server.port).then((client) { 123 Socket.connect("127.0.0.1", server.port).then((client) {
124 client.listen((data) {}, onDone: server.close); 124 client.listen((data) {}, onDone: server.close);
125 client.add(new List.filled(1024 * 1024, 0)); 125 client.add(new List.filled(1024 * 1024, 0));
126 client.destroy(); 126 client.destroy();
127 }); 127 });
128 }); 128 });
129 } 129 }
130 130
131 static void clientSocketAddCloseNoErrorTest() { 131 static void clientSocketAddCloseNoErrorTest() {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 clientSocketAddCloseErrorTest(); 233 clientSocketAddCloseErrorTest();
234 clientSocketAddCloseResultErrorTest(); 234 clientSocketAddCloseResultErrorTest();
235 unknownHostTest(); 235 unknownHostTest();
236 } 236 }
237 } 237 }
238 238
239 main() { 239 main() {
240 SocketExceptionTest.testMain(); 240 SocketExceptionTest.testMain();
241 } 241 }
242 242
OLDNEW
« no previous file with comments | « tests/standalone/io/raw_socket_typed_data_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698