summaryrefslogtreecommitdiff
path: root/tests/websocket-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/websocket-test.c')
-rw-r--r--tests/websocket-test.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/websocket-test.c b/tests/websocket-test.c
index eb74ea12..56cd1e13 100644
--- a/tests/websocket-test.c
+++ b/tests/websocket-test.c
@@ -380,6 +380,19 @@ test_send_big_packets (Test *test,
g_assert (g_bytes_equal (sent, received));
g_bytes_unref (sent);
g_bytes_unref (received);
+ received = NULL;
+
+ soup_websocket_connection_set_max_payload_size (test->client, 1000 * 1000 + 1);
+ g_assert (soup_websocket_connection_get_max_payload_size (test->client) == (1000 * 1000 + 1));
+ soup_websocket_connection_set_max_payload_size (test->server, 1000 * 1000 + 1);
+ g_assert (soup_websocket_connection_get_max_payload_size (test->server) == (1000 * 1000 + 1));
+
+ sent = g_bytes_new_take (g_strnfill (1000 * 1000, '?'), 1000 * 1000);
+ soup_websocket_connection_send_text (test->server, g_bytes_get_data (sent, NULL));
+ WAIT_UNTIL (received != NULL);
+ g_assert (g_bytes_equal (sent, received));
+ g_bytes_unref (sent);
+ g_bytes_unref (received);
}
static void