Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / net / data / websocket / split_packet_check.html
blob6b7e980a788a7533942a8ee991b2b06bcadc657d
1 <!DOCTYPE html>
2 <html>
3 <head>
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';
9 // Do connection test.
10 var ws = new WebSocket(url);
12 ws.onopen = function()
14 // Close WebSocket connection once it is established.
15 ws.close();
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';
23 else
24 document.title = 'FAIL';
27 </script>
28 </head>
29 </html>