4 <title>test ws split packet
</title>
5 <script type=
"text/javascript">
6 var protocol
= location
.protocol
.replace('http', 'ws');
7 var url
= protocol
+ '//' + location
.host
+ '/close-with-split-packet';
10 var ws
= new WebSocket(url
);
12 ws
.onopen = function()
14 // Close WebSocket connection once it is established.
18 ws
.onclose = function(event
)
20 // Check wasClean, then set proper title.
21 if (event
.wasClean
&& event
.code
=== 3004 && event
.reason
=== 'split test')
22 document
.title
= 'PASS';
24 document
.title
= 'FAIL';