mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02:00
Depends on D18605 Differential Revision: https://phabricator.services.mozilla.com/D18606 --HG-- extra : moz-landing-system : lando
15 lines
446 B
JavaScript
15 lines
446 B
JavaScript
function fileURL(filename) {
|
|
let ifile = getChromeDir(getResolvedURI(gTestPath));
|
|
ifile.append(filename);
|
|
return Services.io.newFileURI(ifile).spec;
|
|
}
|
|
|
|
function httpURL(filename, host = "https://example.com/") {
|
|
let root = getRootDirectory(gTestPath)
|
|
.replace("chrome://mochitests/content/", host);
|
|
return root + filename;
|
|
}
|
|
|
|
function add307(url, host = "https://example.com/") {
|
|
return httpURL("307redirect.sjs?" + url, host);
|
|
}
|