| 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 6406dfb646d9b04e5bde0f8ae22118bf22181681..efff5f2006b126e39e3a2bc67be07ebe3bd8eb40 100644
|
| --- a/tests/standalone/io/web_socket_test.dart
|
| +++ b/tests/standalone/io/web_socket_test.dart
|
| @@ -19,8 +19,8 @@ void testRequestResponseClientCloses(
|
| var count = 0;
|
| conn.onMessage = (Object message) => conn.send(message);
|
| conn.onClosed = (status, reason) {
|
| - Expect.equals(closeStatus, status);
|
| - Expect.equals(closeReason, reason);
|
| + Expect.equals(closeStatus === null ? 1005 : closeStatus, status);
|
| + Expect.equals(closeReason === null ? "" : closeReason, reason);
|
| };
|
| };
|
| server.defaultRequestHandler = wsHandler.onRequest;
|
| @@ -42,8 +42,8 @@ void testRequestResponseClientCloses(
|
| }
|
| };
|
| wsconn.onClosed = (status, reason) {
|
| - Expect.equals(closeStatus, status);
|
| - Expect.isNull(reason);
|
| + Expect.equals(closeStatus === null ? 1005 : closeStatus, status);
|
| + Expect.equals("", reason);
|
| closeCount++;
|
| if (closeCount == totalConnections) {
|
| client.shutdown();
|
| @@ -78,8 +78,8 @@ void testRequestResponseServerCloses(
|
| }
|
| };
|
| conn.onClosed = (status, reason) {
|
| - Expect.equals(closeStatus, status);
|
| - Expect.isNull(reason);
|
| + Expect.equals(closeStatus === null ? 1005 : closeStatus, status);
|
| + Expect.equals("", reason);
|
| closeCount++;
|
| if (closeCount == totalConnections) {
|
| client.shutdown();
|
| @@ -95,8 +95,8 @@ void testRequestResponseServerCloses(
|
| WebSocketClientConnection wsconn = new WebSocketClientConnection(conn);
|
| wsconn.onMessage = (message) => wsconn.send(message);
|
| wsconn.onClosed = (status, reason) {
|
| - Expect.equals(closeStatus, status);
|
| - Expect.equals(closeReason, reason);
|
| + Expect.equals(closeStatus === null ? 1005 : closeStatus, status);
|
| + Expect.equals(closeReason === null ? "" : closeReason, reason);
|
| };
|
| }
|
| }
|
| @@ -263,7 +263,7 @@ void testW3CInterface(
|
| };
|
| conn.onClosed = (status, reason) {
|
| Expect.equals(closeStatus, status);
|
| - Expect.isNull(reason);
|
| + Expect.equals("", reason);
|
| closeCount++;
|
| if (closeCount == totalConnections) {
|
| server.close();
|
|
|