зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1503393 - Make 'no proxy' field editable r=jaws
--HG-- extra : rebase_source : 6cb1bd621a2f1702cbc85ea67bf3fcb989eee959 extra : source : 7878029aaba609b5433d3eea98873a450cf2cb62
This commit is contained in:
Родитель
35c7b5ebae
Коммит
0ab27f5273
|
@ -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 != 1;
|
||||
noProxiesPref.disabled = proxyTypePref.value == 0;
|
||||
|
||||
var autoconfigURLPref = Preferences.get("network.proxy.autoconfig_url");
|
||||
autoconfigURLPref.disabled = proxyTypePref.value != 2;
|
||||
|
|
|
@ -750,12 +750,14 @@ add_task(async function testExtensionControlledProxyConfig() {
|
|||
let manualControlContainer = controlGroup.querySelector("grid");
|
||||
return {
|
||||
manualControls: [
|
||||
...manualControlContainer.querySelectorAll("label"),
|
||||
...manualControlContainer.querySelectorAll("textbox"),
|
||||
...manualControlContainer.querySelectorAll("label:not([control=networkProxyNone])"),
|
||||
...manualControlContainer.querySelectorAll("textbox:not(#networkProxyNone)"),
|
||||
...manualControlContainer.querySelectorAll("checkbox"),
|
||||
...doc.querySelectorAll("#networkProxySOCKSVersion > radio")],
|
||||
pacControls: [doc.getElementById("networkProxyAutoconfigURL")],
|
||||
otherControls: [
|
||||
manualControlContainer.querySelector("label[control=networkProxyNone]"),
|
||||
doc.getElementById("networkProxyNone"),
|
||||
...controlGroup.querySelectorAll(":scope > radio"),
|
||||
...doc.querySelectorAll("#ConnectionsDialogPane > checkbox")],
|
||||
};
|
||||
|
@ -764,14 +766,14 @@ add_task(async function testExtensionControlledProxyConfig() {
|
|||
let controls = getProxyControls();
|
||||
for (let element of controls.manualControls) {
|
||||
let disabled = isControlled || proxyType !== proxySvc.PROXYCONFIG_MANUAL;
|
||||
is(element.disabled, disabled, `Proxy controls are ${controlState}.`);
|
||||
is(element.disabled, disabled, `Manual proxy controls should be ${controlState} - control: ${element.outerHTML}.`);
|
||||
}
|
||||
for (let element of controls.pacControls) {
|
||||
let disabled = isControlled || proxyType !== proxySvc.PROXYCONFIG_PAC;
|
||||
is(element.disabled, disabled, `Proxy controls are ${controlState}.`);
|
||||
is(element.disabled, disabled, `PAC proxy controls should be ${controlState} - control: ${element.outerHTML}.`);
|
||||
}
|
||||
for (let element of controls.otherControls) {
|
||||
is(element.disabled, isControlled, `Proxy controls are ${controlState}.`);
|
||||
is(element.disabled, isControlled, `Other proxy controls should be ${controlState} - control: ${element.outerHTML}.`);
|
||||
}
|
||||
} else {
|
||||
let elem = doc.getElementById(CONNECTION_SETTINGS_DESC_ID);
|
||||
|
|
Загрузка…
Ссылка в новой задаче