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