// This test ensures that various configurable upgrade exceptions work "use strict";
async function runTest(desc, url, expectedURI) {
await BrowserTestUtils.withNewTab("about:blank", async function (browser) {
let loaded = BrowserTestUtils.browserLoaded(browser, false, null, true);
BrowserTestUtils.startLoadingURIString(browser, url);
await loaded;
await SpecialPowers.spawn(
browser,
[desc, expectedURI],
async function (desc, expectedURI) { // XXX ckerschb: generally we use the documentURI, but our test infra // can not handle .onion, hence we use the URI of the failed channel // stored on the docshell to see if the scheme was upgraded to https.
let loadedURI = content.document.documentURI; if (loadedURI.startsWith("about:neterror")) {
loadedURI = content.docShell.failedChannel.URI.spec;
}
is(loadedURI, expectedURI, desc);
}
);
});
}
// by default local addresses and .onion should *not* get upgraded
add_task(async function () {
requestLongerTimeout(2);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.