blob: f3f240ef743a0556e483efadb530a88dd0278f6b [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<script src="../../../../js-test-resources/js-test-pre.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script>
description("Test whether WebSocket handshake fails if the server sends a WebSocket extensions header with non-ascii characters in its value.");
window.jsTestIsAsync = true;
var url = "ws://localhost:8880/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-extensions";
var ws = new WebSocket(url);
var closeEvent;
ws.onopen = function() {
testFailed("Connection established.");
ws.close();
};
ws.onclose = function(event) {
closeEvent = event;
shouldBeFalse("closeEvent.wasClean");
finishJSTest();
};
</script>
<script src="../../../../js-test-resources/js-test-post.js"></script>
</body>
</html>