{"size": 490, "ext": "js", "max_stars_repo_path": "websockets/Secure-Close-1005.any.js", "max_stars_repo_name": "FarooqAR/wpt", "max_stars_repo_stars_event_min_datetime": "2015-06-18T23:58:20.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-23T09:32:39.000Z", "max_issues_repo_path": "websockets/Secure-Close-1005.any.js", "max_issues_repo_name": "FarooqAR/wpt", "max_issues_repo_issues_event_min_datetime": "2015-05-04T09:58:14.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-31T19:35:03.000Z", "max_forks_repo_path": "websockets/Secure-Close-1005.any.js", "max_forks_repo_name": "FarooqAR/wpt", "max_forks_repo_forks_event_min_datetime": "2015-07-14T10:40:50.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-15T01:11:49.000Z"}
{"max_stars_count": 575, "max_issues_count": 113, "max_forks_count": 52, "avg_line_length": 35.0, "max_line_length": 177, "alphanum_fraction": 0.7183673469}
// META: script=websocket.sub.js

var test = async_test("Create Secure WebSocket - Close the Connection - close(1005) - see '7.1.5.  The WebSocket Connection Close Code' in http://www.ietf.org/rfc/rfc6455.txt");

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

wsocket.addEventListener('open', test.step_func(function(evt) {
  assert_throws_dom("INVALID_ACCESS_ERR", function() {
    wsocket.close(1005, "1005 - reserved code")
  });
  test.done();
}), true);
