4 <script src=
"/js-test-resources/js-test.js"></script>
7 <div id=
"description"></div>
8 <div id=
"console"></div>
10 description("Test receiving compressed frames with BFINAL = 1.");
12 window
.jsTestIsAsync
= true;
24 ws
= new WebSocket("ws://localhost:8880/permessage-deflate?set_bfinal");
26 ws
.onopen = function(event
)
29 debug("Sending message: \"" + messages
[messageIndex
] + "\"");
30 ws
.send(messages
[messageIndex
]);
33 ws
.onmessage = function(event
)
35 shouldBe("event.data", "'" + messages
[messageIndex
] + "'");
36 if (messageIndex
=== messages
.length
- 1)
40 debug("Sending message: \"" + messages
[messageIndex
] + "\"");
41 ws
.send(messages
[messageIndex
]);
45 ws
.onclose = function(event
)
47 debug("onclose() was called.");
49 shouldBeTrue("closeEvent.wasClean");