Apply HSTS to WebSocket connections.
[chromium-blink-merge.git] / chrome / test / data / websocket / check-hsts.html
blob46c1967c5bf5e04e136c633791a43130d9b563fc
1 <!DOCTYPE html>
2 <title>Testing HSTS with WebSockets</title>
3 <script>
4 var ws_url = window.location.hash.substring(1);
5 var ws = new WebSocket(ws_url);
7 ws.onopen = function()
9 // The fact that the WebSocket connect opened successfully means that SSL was
10 // used.
11 document.title = 'PASS';
14 ws.onclose = function(evt)
16 if (!evt.wasClean)
17 document.title = 'FAIL';
19 </script>