Backed out 3 changesets (bug 1503393) for failing xpcshell's test_proxy-failover_canceled.js and mochitest browser-chrome's browser_firstPartyIsolation.js

Backed out changeset 02892fb6feab (bug 1503393)
Backed out changeset 7b1514667292 (bug 1503393)
Backed out changeset 606cfe2ddd36 (bug 1503393)
This commit is contained in:
Sebastian Hengst 2018-11-19 23:14:13 +02:00
parent d57064d061
commit 4caf52d15b
3 changed files with 9 additions and 39 deletions

View File

@ -128,7 +128,7 @@ var gConnectionsDialog = {
var autologinProxyPref = Preferences.get("signon.autologin.proxy");
autologinProxyPref.disabled = proxyTypePref.value == 0;
var noProxiesPref = Preferences.get("network.proxy.no_proxies_on");
noProxiesPref.disabled = proxyTypePref.value == 0;
noProxiesPref.disabled = proxyTypePref.value != 1;
var autoconfigURLPref = Preferences.get("network.proxy.autoconfig_url");
autoconfigURLPref.disabled = proxyTypePref.value != 2;

View File

@ -2225,12 +2225,6 @@ nsProtocolProxyService::Resolve_Internal(nsIChannel *channel,
if (mPACMan && mPACMan->IsPACURI(uri))
return NS_OK;
// if proxies are enabled and this host:port combo is supposed to use a
// proxy, check for a proxy.
if ((mProxyConfig == PROXYCONFIG_DIRECT) ||
!CanUseProxy(uri, info.defaultPort))
return NS_OK;
bool mainThreadOnly;
if (mSystemProxySettings &&
mProxyConfig == PROXYCONFIG_SYSTEM &&
@ -2294,6 +2288,13 @@ nsProtocolProxyService::Resolve_Internal(nsIChannel *channel,
}
}
// if proxies are enabled and this host:port combo is supposed to use a
// proxy, check for a proxy.
if (mProxyConfig == PROXYCONFIG_DIRECT ||
(mProxyConfig == PROXYCONFIG_MANUAL &&
!CanUseProxy(uri, info.defaultPort)))
return NS_OK;
// Proxy auto config magic...
if (mProxyConfig == PROXYCONFIG_PAC || mProxyConfig == PROXYCONFIG_WPAD) {
// Do not query PAC now.
@ -2559,4 +2560,4 @@ nsProtocolProxyService::GetIsPACLoading(bool *aResult)
}
} // namespace net
} // namespace mozilla
} // namespace mozilla

View File

@ -953,41 +953,10 @@ function isresolvable_callback(pi)
Assert.equal(pi.port, 1234);
Assert.equal(pi.host, "127.0.0.1");
run_localhost_pac();
}
function run_localhost_pac()
{
// test localhost in the pac file
var pac = 'data:text/plain,' +
'function FindProxyForURL(url, host) {' +
' return "PROXY totallycrazy:1234";' +
'}';
// Use default filter list string for "no_proxies_on" ("localhost, 127.0.0.1")
prefs.clearUserPref("network.proxy.no_proxies_on");
var channel = NetUtil.newChannel({
uri: "http://localhost/",
loadUsingSystemPrincipal: true
});
prefs.setIntPref("network.proxy.type", 2);
prefs.setCharPref("network.proxy.autoconfig_url", pac);
var cb = new resolveCallback();
cb.nextFunction = localhost_callback;
var req = pps.asyncResolve(channel, 0, cb);
}
function localhost_callback(pi)
{
Assert.equal(pi, null); // no proxy!
prefs.setIntPref("network.proxy.type", 0);
do_test_finished();
}
function run_test() {
register_test_protocol_handler();