servo/tests/wpt/web-platform-tests/websockets/constants.js
Ms2ger 477bfa3675 Remove the SCHEME_AND_DOMAIN constant.
All its users are connecting to port 80, which is not typically under the
control of the wpt server.
2015-06-15 17:29:29 +02:00

12 lines
359 B
JavaScript

//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;
}