Index: tests/standalone/io/web_socket_test.dart |
diff --git a/tests/standalone/io/web_socket_test.dart b/tests/standalone/io/web_socket_test.dart |
index f3213e672572008a5ff98e33d50dca8e06852575..9ae175815ac65e4cf21560906f2598529e5b2207 100644 |
--- a/tests/standalone/io/web_socket_test.dart |
+++ b/tests/standalone/io/web_socket_test.dart |
@@ -187,6 +187,36 @@ class SecurityConfiguration { |
} |
+ void testCancelThenClose() { |
+ createServer().then((server) { |
+ server.transform(new WebSocketTransformer()).listen((webSocket) { |
+ webSocket.listen(null).cancel(); |
+ webSocket.close(); |
+ server.close(); |
+ }); |
+ |
+ createClient(server.port).then((webSocket) { |
+ webSocket.close(); |
+ }); |
+ }); |
+ } |
+ |
+ void testCloseThenCancel() { |
+ createServer().then((server) { |
+ server.transform(new WebSocketTransformer()).listen((webSocket) { |
+ var subscription = webSocket.listen(null); |
+ webSocket.close(); |
+ subscription.cancel(); |
+ server.close(); |
+ }); |
+ |
+ createClient(server.port).then((webSocket) { |
+ webSocket.close(); |
+ }); |
+ }); |
+ } |
+ |
+ |
void testListenAfterClose() { |
createServer().then((server) { |
server.transform(new WebSocketTransformer()).listen((webSocket) { |
@@ -543,6 +573,8 @@ class SecurityConfiguration { |
testMessageLength(65535); |
testMessageLength(65536); |
testCloseNoListen(); |
+ testCancelThenClose(); |
+ testCloseThenCancel(); |
testListenAfterClose(); |
testDoubleCloseClient(); |
testDoubleCloseServer(); |