зеркало из https://github.com/mozilla/gecko-dev.git
Bug 889034 - Use a dynamic port in places/ xpcshell tests so they can be run in parallel. r=mak
This commit is contained in:
Родитель
cbe020acda
Коммит
85bc4fa046
|
@ -14,7 +14,8 @@ const TEMP_REDIR_PATH = "/tempredir";
|
|||
const FOUND_PATH = "/found";
|
||||
|
||||
const HTTPSVR = new HttpServer();
|
||||
const PORT = 4444;
|
||||
HTTPSVR.start(-1);
|
||||
const PORT = HTTPSVR.identity.primaryPort;
|
||||
HTTPSVR.registerPathHandler(PERMA_REDIR_PATH, permaRedirHandler);
|
||||
HTTPSVR.registerPathHandler(TEMP_REDIR_PATH, tempRedirHandler);
|
||||
HTTPSVR.registerPathHandler(FOUND_PATH, foundHandler);
|
||||
|
@ -61,10 +62,7 @@ function PathHandler(aMeta, aResponse, aChannelEvent, aRedirURL) {
|
|||
function run_test() {
|
||||
do_test_pending();
|
||||
|
||||
HTTPSVR.start(PORT);
|
||||
|
||||
var chan = NetUtil.ioService
|
||||
.newChannelFromURI(uri("http://localhost:4444/permaredir"));
|
||||
var chan = NetUtil.ioService.newChannelFromURI(uri(PERMA_REDIR_URL));
|
||||
var listener = new ChannelListener();
|
||||
chan.notificationCallbacks = listener;
|
||||
chan.asyncOpen(listener, null);
|
||||
|
|
Загрузка…
Ссылка в новой задаче