blob: 3f0613a161697e71c5bdd1ebe4ea09bfb4f0e5ab [file] [log] [blame]
Test WebSocket URL parsing.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new WebSocket() threw exception TypeError: Failed to construct 'WebSocket': 1 argument required, but only 0 present..
PASS new WebSocket(null) threw exception SyntaxError: Failed to construct 'WebSocket': The URL 'null' is invalid..
PASS new WebSocket("ws://javascript:a") threw exception SyntaxError: Failed to construct 'WebSocket': The URL 'ws://javascript:a' is invalid..
PASS new WebSocket("/applet") threw exception SyntaxError: Failed to construct 'WebSocket': The URL '/applet' is invalid..
PASS new WebSocket("javascript:a") threw exception SyntaxError: Failed to construct 'WebSocket': The URL's scheme must be either 'ws' or 'wss'. 'javascript' is not allowed..
PASS (new WebSocket("ws://127.0.0.1:8880/a/../simple")).url is "ws://127.0.0.1:8880/simple"
PASS (new WebSocket("ws://127.0.0.1:8880/simple?")).url is "ws://127.0.0.1:8880/simple?"
PASS (new WebSocket("ws://127.0.0.1:8880/simple?k=v")).url is "ws://127.0.0.1:8880/simple?k=v"
PASS new WebSocket("ws://127.0.0.1/path#") threw exception SyntaxError: Failed to construct 'WebSocket': The URL contains a fragment identifier (''). Fragment identifiers are not allowed in WebSocket URLs..
PASS new WebSocket("ws://127.0.0.1/path#fragment") threw exception SyntaxError: Failed to construct 'WebSocket': The URL contains a fragment identifier ('fragment'). Fragment identifiers are not allowed in WebSocket URLs..
PASS new WebSocket("ws:://127.0.0.1/") threw exception SyntaxError: Failed to construct 'WebSocket': The URL 'ws:://127.0.0.1/' is invalid..
PASS successfullyParsed is true
TEST COMPLETE