| 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 e3f58e6b82a5a60d4cc3a1db7e384f549eb0ef2d..c20ee068cb1063a77fa5616a6093dff5294c0786 100644
|
| --- a/tests/standalone/io/web_socket_test.dart
|
| +++ b/tests/standalone/io/web_socket_test.dart
|
| @@ -164,6 +164,50 @@ class SecurityConfiguration {
|
| }
|
|
|
|
|
| + void testDoubleCloseClient() {
|
| + createServer().then((server) {
|
| + server.transform(new WebSocketTransformer()).listen((webSocket) {
|
| + webSocket.listen((event) {
|
| + if (event is CloseEvent) {
|
| + webSocket.close();
|
| + }
|
| + });
|
| + });
|
| +
|
| + createClient(server.port).then((webSocket) {
|
| + webSocket.listen((event) {
|
| + if (event is CloseEvent) {
|
| + webSocket.close();
|
| + }
|
| + });
|
| + webSocket.close();
|
| + });
|
| + });
|
| + }
|
| +
|
| +
|
| + void testDoubleCloseServer() {
|
| + createServer().then((server) {
|
| + server.transform(new WebSocketTransformer()).listen((webSocket) {
|
| + webSocket.listen((event) {
|
| + if (event is CloseEvent) {
|
| + webSocket.close();
|
| + }
|
| + });
|
| + webSocket.close();
|
| + });
|
| +
|
| + createClient(server.port).then((webSocket) {
|
| + webSocket.listen((event) {
|
| + if (event is CloseEvent) {
|
| + webSocket.close();
|
| + }
|
| + });
|
| + });
|
| + });
|
| + }
|
| +
|
| +
|
| void testNoUpgrade() {
|
| createServer().then((server) {
|
| // Create a server which always responds with NOT_FOUND.
|
| @@ -279,6 +323,8 @@ class SecurityConfiguration {
|
| testMessageLength(127);
|
| testMessageLength(65535);
|
| testMessageLength(65536);
|
| + testDoubleCloseClient();
|
| + testDoubleCloseServer();
|
| testNoUpgrade();
|
| testUsePOST();
|
| testW3CInterface(10, 3002, "Got tired");
|
|
|