blob: 165fc2d0dfbdb8dc09add2f9fc6c53b93483edb1 [file] [log] [blame]
Andrew Top61a84952019-04-30 15:07:33 -07001<!DOCTYPE html>
2<html>
3<head>
4 <title>W3C WebSocket API - Close WebSocket - Code is null</title>
5 <script type="text/javascript" src="/resources/testharness.js"></script>
6 <script type="text/javascript" src="/resources/testharnessreport.js"></script>
7 <script type="text/javascript" src="websocket.js?pipe=sub"></script>
8</head>
9<body>
10 <div id="log"></div>
11 <script type="text/javascript">
12
13 var test = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(null) - INVALID_ACCESS_ERR is thrown");
14
15 var wsocket = CreateWebSocket(false, false, false);
16 var isOpenCalled = false;
17
18 wsocket.addEventListener('open', test.step_func(function (evt) {
19 assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(null) });
20 test.done();
21 }), true);
22 </script>
23
24</body>
25</html>