summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/websockets/constructor.html
blob: c135b325ec6bf7e71896569f17b1eda064234c1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<!DOCTYPE html>
<title>WebSocket constructor</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="websocket.sub.js"></script>
<div id="log"></div>
<script>
test(function() {
  var ws = new WebSocket("ws://" + __SERVER__NAME + ":" + __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.")
</script>