summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/websockets/constants.js
blob: 8312cd253fe6b133a7dde6045f950ac33ce5df2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//This file requires server-side substitutions and must be included as constants.js?pipe=sub

var PORT = "{{ports[ws][0]}}";
//FIXME: Add support for wss
var PORT_SSL = "{{ports[ws][0]}}";

var SCHEME_DOMAIN_PORT;
if (location.search == '?wss') {
  SCHEME_DOMAIN_PORT = 'wss://{{host}}:' + PORT_SSL;
} else {
  SCHEME_DOMAIN_PORT = 'ws://{{host}}:' + PORT;
}