Revision 7efc1fe4f0c85c8b1fdc98fe5c53af690d2122af authored by Anne van Kesteren on 24 May 2016, 13:07:58 UTC, committed by Anne van Kesteren on 24 May 2016, 13:07:58 UTC
1 parent c0b620d
Raw File
005.html
<!doctype html>
<title>WebSockets: proper first line</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+'/simple_handshake');
  ws.onmessage = t.step_func(function() {assert_unreached()});
  ws.onopen = t.step_func(function(e) {
    ws.onclose = t.step_func(function(e) {
      assert_equals(e.wasClean, true);
      ws.onclose = t.step_func(function() {assert_unreached()});
      setTimeout(t.step_func(function() {t.done();}), 50)
    })
    ws.close();
  })
});
</script>
back to top