summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/websockets/constructor/017.html
blob: 8a7960d8865704adeed9239078cc29a58289257d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!doctype html>
<title>WebSockets: too few slashes after ws: and wss:</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=../constants.js?pipe=sub></script>
<meta name="variant" content="">
<meta name="variant" content="?wss">
<div id=log></div>
<script>
var tests = [
  ['ws:', PORT],
  ['ws:/', PORT],
  ['wss:', PORT_SSL],
  ['wss:/', PORT_SSL]
];
//Pass condition is to not throw
for (var i = 0; i < tests.length; ++i) {
  test(function(){new WebSocket(tests[i][0] + location.hostname + ':' + tests[i][1] + '/echo')}, tests[i][0]);
}
</script>