// These are globlas defined for proxy servers, in ProxyAutoConfig.cpp. See // PACGlobalFunctions /* globals dnsResolve, alert */
/* This test checks that using a PAC script still works when TRR is on. Steps: - Set the pac script - Do a request to make sure that the script is loaded - Set the TRR mode - Make a request that would lead to running the PAC script We run these steps for TRR mode 2 and 3, and with fetchOffMainThread = true/false
*/
let httpserv = new HttpServer();
httpserv.registerPathHandler("/", function handler(metadata, response) {
let content = "ok";
response.setHeader("Content-Length", `${content.length}`);
response.bodyOutputStream.write(content, content.length);
});
httpserv.start(-1);
Services.prefs.setBoolPref("network.dns.native-is-localhost", false);
Services.prefs.setIntPref("network.trr.mode", 0); // Disable TRR until the PAC is loaded
override.addIPOverride("example.org", "127.0.0.1");
let chan = NetUtil.newChannel({
uri: `http://example.org:${httpserv.identity.primaryPort}/`,
loadUsingSystemPrincipal: true,
}).QueryInterface(Ci.nsIHttpChannel);
await new Promise(resolve => chan.asyncOpen(new ChannelListener(resolve)));
await consolePromise;
let h2Port = Services.env.get("MOZHTTP2_PORT"); Assert.notEqual(h2Port, null); Assert.notEqual(h2Port, "");
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.