summaryrefslogtreecommitdiffstats
path: root/test/wpt/tests/websockets/constructor.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/wpt/tests/websockets/constructor.any.js')
-rw-r--r--test/wpt/tests/websockets/constructor.any.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/wpt/tests/websockets/constructor.any.js b/test/wpt/tests/websockets/constructor.any.js
new file mode 100644
index 0000000..0cef206
--- /dev/null
+++ b/test/wpt/tests/websockets/constructor.any.js
@@ -0,0 +1,10 @@
+// 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.")