blob: cad49329c00a513d1a7b933aca63b54fa75ccbcf [file] [log] [blame]
Andrew Top61a84952019-04-30 15:07:33 -07001<!DOCTYPE html>
2<html>
3<head>
4 <title>W3C WebSocket API - Close Secure WebSocket - Only reason</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 Secure WebSocket - Close the Connection - close(only reason) - INVALID_ACCESS_ERR is thrown");
14
15 var wsocket = CreateWebSocket(true, false, false);
16
17 wsocket.addEventListener('open', test.step_func(function (evt) {
18 assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close("Close with only reason") });
19 test.done();
20 }), true);
21 </script>
22
23</body>
24</html>