blob: 033b584a253c87f2d1158df448c97db5fe9813f6 [file] [log] [blame]
WebSocket should fail if invalid subprotocols are specified
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new WebSocket(url, 'a b') threw exception SyntaxError: Failed to construct 'WebSocket': The subprotocol 'a b' is invalid..
PASS new WebSocket(url, 'a,b') threw exception SyntaxError: Failed to construct 'WebSocket': The subprotocol 'a,b' is invalid..
PASS new WebSocket(url, 'a\0b') threw exception SyntaxError: Failed to construct 'WebSocket': The subprotocol 'a\u0000b' is invalid..
PASS new WebSocket(url, '\u3042') threw exception SyntaxError: Failed to construct 'WebSocket': The subprotocol '\u3042' is invalid..
PASS new WebSocket(url, ['a', 'b', 'c d']) threw exception SyntaxError: Failed to construct 'WebSocket': The subprotocol 'c d' is invalid..
PASS new WebSocket(url, ['a', 'b', 'c', 'a']) threw exception SyntaxError: Failed to construct 'WebSocket': The subprotocol 'a' is duplicated..
PASS successfullyParsed is true
TEST COMPLETE