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

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

Issue 91223002: Add support for Websocket protocols. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix selecting invalid protocol and document. Created 7 years 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 | « sdk/lib/io/websocket_impl.dart ('k') | tests/standalone/io/web_socket_protocol_test.dart » ('j') | 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 // 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 subscription.cancel(); 203 subscription.cancel();
204 socket.close(); 204 socket.close();
205 server.close(); 205 server.close();
206 asyncEnd(); 206 asyncEnd();
207 }, 207 },
208 onDone: () { Expect.fail("Unexpected pipe completion"); }); 208 onDone: () { Expect.fail("Unexpected pipe completion"); });
209 }); 209 });
210 }); 210 });
211 } 211 }
212 212
213 void testCloseWriteNoListen() {
214 asyncStart();
215 ServerSocket.bind(InternetAddress.LOOPBACK_IP_V4, 0).then((server) {
216 server.listen(
217 (client) {
218 client.close();
219 });
220 Socket.connect("127.0.0.1", server.port).then((socket) {
221 socket.close();
222 server.close();
223 asyncEnd();
224 });
225 });
226 }
227
213 main() { 228 main() {
214 asyncStart();
215 testArguments(); 229 testArguments();
216 testSimpleBind(); 230 testSimpleBind();
217 testInvalidBind(); 231 testInvalidBind();
218 testConnectNoDestroy(); 232 testConnectNoDestroy();
219 testConnectImmediateDestroy(); 233 testConnectImmediateDestroy();
220 testConnectConsumerClose(); 234 testConnectConsumerClose();
221 testConnectConsumerWriteClose(); 235 testConnectConsumerWriteClose();
222 testConnectStreamClose(); 236 testConnectStreamClose();
223 testConnectStreamDataClose(true); 237 testConnectStreamDataClose(true);
224 testConnectStreamDataClose(false); 238 testConnectStreamDataClose(false);
225 testConnectStreamDataCloseCancel(true); 239 testConnectStreamDataCloseCancel(true);
226 testConnectStreamDataCloseCancel(false); 240 testConnectStreamDataCloseCancel(false);
227 asyncEnd(); 241 testCloseWriteNoListen();
228 } 242 }
OLDNEW
« no previous file with comments | « sdk/lib/io/websocket_impl.dart ('k') | tests/standalone/io/web_socket_protocol_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698