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

Unified 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, 1 month 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 | « sdk/lib/io/websocket_impl.dart ('k') | tests/standalone/io/web_socket_protocol_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/socket_test.dart
diff --git a/tests/standalone/io/socket_test.dart b/tests/standalone/io/socket_test.dart
index beec587ce5f3b3d608dd2181885e68b0a9a8ec6b..56a76bbaa98fd866aab01982739fe255eb81a1de 100644
--- a/tests/standalone/io/socket_test.dart
+++ b/tests/standalone/io/socket_test.dart
@@ -210,8 +210,22 @@ void testConnectStreamDataCloseCancel(bool useDestroy) {
});
}
-main() {
+void testCloseWriteNoListen() {
asyncStart();
+ ServerSocket.bind(InternetAddress.LOOPBACK_IP_V4, 0).then((server) {
+ server.listen(
+ (client) {
+ client.close();
+ });
+ Socket.connect("127.0.0.1", server.port).then((socket) {
+ socket.close();
+ server.close();
+ asyncEnd();
+ });
+ });
+}
+
+main() {
testArguments();
testSimpleBind();
testInvalidBind();
@@ -224,5 +238,5 @@ main() {
testConnectStreamDataClose(false);
testConnectStreamDataCloseCancel(true);
testConnectStreamDataCloseCancel(false);
- asyncEnd();
+ testCloseWriteNoListen();
}
« 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