blob: 54100be9afce36dcead12c4bc8594ec6f63b4fb5 [file] [log] [blame]
Andrew Top61a84952019-04-30 15:07:33 -07001<!DOCTYPE html>
2<html>
3<head>
4 <title>W3C WebSocket API - Create WebSocket - protocol with space</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 test(function () {
13 var wsocket;
14 assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithSpaceInProtocol("ec ho") });
15 }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string with a space in it - SYNTAX_ERR is thrown")
16 </script>
17</body>
18</html>