aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/websockets/Send-before-open.any.js
blob: b2f1ea9c3aa856e5e0ace17ff4ff3a69d6cf57fd (plain) (blame)
1
2
3
4
5
6
7
8
// META: script=websocket.sub.js

test(function() {
  var wsocket = CreateWebSocket(false, false, false);
  assert_throws("INVALID_STATE_ERR", function() {
    wsocket.send("Message to send")
  });
}, "Send data on a WebSocket before connection is opened - INVALID_STATE_ERR is returned")