blob: e0be938abc8d3554513646a3d6c1363ca4d245d6 [file] [log] [blame]
<!doctype html>
<title>WebSockets: getting readyState in open</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=../../../constants.js?pipe=sub></script>
<meta name="variant" content="">
<meta name="variant" content="?wss">
<div id=log></div>
<script>
async_test(function(t) {
var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
ws.onopen = t.step_func(function(e) {
assert_equals(ws.readyState, ws.OPEN);
ws.close();
t.done();
});
ws.onerror = ws.onmessage = ws.onclose = t.step_func(function() {assert_unreached()});
});
</script>