https://github.com/web-platform-tests/wpt
Raw File
Tip revision: caabb339c4b96dfc4a9e42a40c118e5df7ccd070 authored by Tarun Bansal on 07 May 2018, 19:22:03 UTC
Add client hints headers as CORS safe headers
Tip revision: caabb33
Secure-Close-readyState-Closing.any.js
// META: script=websocket.sub.js

var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - readyState should be in CLOSING state just before onclose is called");

var wsocket = CreateWebSocket(true, false, false);
var isOpenCalled = false;

wsocket.addEventListener('open', test.step_func(function(evt) {
  wsocket.close();
  assert_equals(wsocket.readyState, 2, "readyState should be 2(CLOSING)");
  test.done();
}), true);
back to top