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

Unified Diff: tests/standalone/io/web_socket_test.dart

Issue 1234163002: Fix a WebSocket crash. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: changelog entry Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/websocket_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « sdk/lib/io/websocket_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698