<body onload="test()">
<p>Should alert "PASS".</p>
<script src="/js-test-resources/js-test-pre.js"></script>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

function test()
{
    var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/echo");
    ws.onopen = function() {
        this.send("PASS");
    }
    ws.onmessage = function(msg) {
        alert(msg.data);
        if (window.testRunner)
            testRunner.notifyDone();
    }
    ws = null;
    gc();
}
</script>
