blob: 5d8801616056862780e3d36b0f42e57921f8d8e1 [file] [log] [blame]
<!DOCTYPE html>
<title>Testing HSTS with WebSockets</title>
<script>
var ws_url = window.location.hash.substring(1);
var ws = new WebSocket(ws_url);
ws.onopen = function()
{
ws.close(1000);
}
ws.onclose = function(evt)
{
// The fact that the WebSocket connect closed successfully means it opened
// successfully, which means that SSL was used.
document.title = evt.wasClean ? 'PASS': 'FAIL';
}
</script>