| Index: net/data/websocket/split_packet_check.html
|
| diff --git a/net/data/websocket/connect_check.html b/net/data/websocket/split_packet_check.html
|
| similarity index 59%
|
| copy from net/data/websocket/connect_check.html
|
| copy to net/data/websocket/split_packet_check.html
|
| index 4a1ca8c5dfc0b7cb86b86f019a3a4038db867f35..8e273ec2849659ac139d3833c3a44e2f57c1705c 100644
|
| --- a/net/data/websocket/connect_check.html
|
| +++ b/net/data/websocket/split_packet_check.html
|
| @@ -1,7 +1,7 @@
|
| <!DOCTYPE html>
|
| <html>
|
| <head>
|
| -<title>test ws connection</title>
|
| +<title>test ws split packet</title>
|
| <script type="text/javascript">
|
|
|
| var href = window.location.href;
|
| @@ -12,22 +12,24 @@ var portBegin = hostEnd + 1;
|
| var portEnd = href.lastIndexOf('/');
|
| var port = href.slice(portBegin, portEnd);
|
| var scheme = href.indexOf('https') >= 0 ? 'wss' : 'ws';
|
| -var url = scheme + '://' + host + ':' + port + '/echo-with-no-extension';
|
| +var url = scheme + '://' + host + ':' + port + '/close-with-split-packet';
|
|
|
| // Do connection test.
|
| var ws = new WebSocket(url);
|
|
|
| ws.onopen = function()
|
| {
|
| - // Set document title to 'PASS'. The test observer catches this title changes
|
| - // to know the result.
|
| - document.title = 'PASS';
|
| + // Close WebSocket connection once it is established.
|
| + ws.close();
|
| }
|
|
|
| -ws.onclose = function()
|
| +ws.onclose = function(event)
|
| {
|
| - // Set document title to 'FAIL'.
|
| - document.title = 'FAIL';
|
| + // Check wasClean, then set proper title.
|
| + if (event.wasClean)
|
| + document.title = 'PASS';
|
| + else
|
| + document.title = 'FAIL';
|
| }
|
|
|
| </script>
|
|
|