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..489b267f12d5eda961486b6accb846cd8ed04241 100644 |
--- a/tests/standalone/io/web_socket_test.dart |
+++ b/tests/standalone/io/web_socket_test.dart |
@@ -187,6 +187,21 @@ class SecurityConfiguration { |
} |
+ void testCancelThenClose() { |
+ createServer().then((server) { |
+ server.transform(new WebSocketTransformer()).listen((webSocket) { |
+ webSocket.listen(null).cancel(); |
Anders Johnsen
2015/07/15 06:32:48
Can you add a test where you close before cancel?
nweiz
2015/07/15 20:29:34
Done.
Anders Johnsen
2015/07/20 11:59:21
Cool, thank you!
|
+ webSocket.close(); |
+ server.close(); |
+ }); |
+ |
+ createClient(server.port).then((webSocket) { |
+ webSocket.close(); |
+ }); |
+ }); |
+ } |
+ |
+ |
void testListenAfterClose() { |
createServer().then((server) { |
server.transform(new WebSocketTransformer()).listen((webSocket) { |
@@ -543,6 +558,7 @@ class SecurityConfiguration { |
testMessageLength(65535); |
testMessageLength(65536); |
testCloseNoListen(); |
+ testCancelThenClose(); |
testListenAfterClose(); |
testDoubleCloseClient(); |
testDoubleCloseServer(); |