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.
This commit is contained in:
Ms2ger 2015-06-11 20:13:45 +02:00
parent 61a9f9d7d4
commit 8ddb9cfcb6
7 changed files with 9 additions and 15 deletions

View file

@ -1,18 +1,12 @@
//This file requires server-side substitutions and must be included as constants.js?pipe=config
var DOMAIN_FOR_WS_TESTS = "{{host}}";
var DOMAIN_FOR_WSS_TESTS = "{{host}}";
//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]}}";
// logic for using wss URLs instead of ws
var SCHEME_AND_DOMAIN;
var SCHEME_DOMAIN_PORT;
if (location.search == '?wss') {
SCHEME_AND_DOMAIN = 'wss://'+DOMAIN_FOR_WSS_TESTS;
SCHEME_DOMAIN_PORT = SCHEME_AND_DOMAIN + ":" + PORT_SSL;
SCHEME_DOMAIN_PORT = 'wss://{{host}}:' + PORT_SSL;
} else {
SCHEME_AND_DOMAIN = 'ws://'+DOMAIN_FOR_WS_TESTS;
SCHEME_DOMAIN_PORT = SCHEME_AND_DOMAIN + ":" + PORT;
SCHEME_DOMAIN_PORT = 'ws://{{host}}:' + PORT;
}