blob: 24d2cd732b17f0c4d50401da8a9635e2a896c56f [file] [log] [blame]
Jxck74f849d2013-06-08 02:39:541<!DOCTYPE html>
2<html>
3<head>
4 <title>W3C WebSocket API - Close Secure WebSocket - Code is string</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"></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(string) - INVALID_ACCESS_ERR is thrown");
14
15 var wsocket = CreateWebSocket(true, 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('string') });
20 clearTimeout(timeOut);
21 test.done();
22 }), true);
23 </script>
24
25</body>
26</html>