Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /websockets/constructor.any.html?default - WPT Dashboard Interop Dashboard
- /websockets/constructor.any.html?wpt_flags=h2 - WPT Dashboard Interop Dashboard
- /websockets/constructor.any.html?wss - WPT Dashboard Interop Dashboard
- /websockets/constructor.any.worker.html?default - WPT Dashboard Interop Dashboard
- /websockets/constructor.any.worker.html?wpt_flags=h2 - WPT Dashboard Interop Dashboard
- /websockets/constructor.any.worker.html?wss - WPT Dashboard Interop Dashboard
// META: script=constants.sub.js
// META: variant=?default
// META: variant=?wss
// META: variant=?wpt_flags=h2
test(function() {
var ws = new WebSocket(SCHEME_DOMAIN_PORT + "/" + __PATH,
"echo", "Stray argument")
assert_true(ws instanceof WebSocket, "Expected a WebSocket instance.")
}, "Calling the WebSocket constructor with too many arguments should not throw.")