<!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 is OK with legacy response headers 'WebSocket-Location' and 'WebSocket-Origin'.");

    window.jsTestIsAsync = true;

    var url = "ws://localhost:8880/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers";
    var ws = new WebSocket(url);
    var closeEvent;

    ws.onopen = function() {
        testPassed("open event fired");
        finishJSTest();
    };

    ws.onerror = function(event) {
        testFailed("error event fired");
        finishJSTest();
    };
</script>
<script src="../../../../js-test-resources/js-test-post.js"></script>
</body>
</html>