mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 843689: make network.IDN.use_whitelist pref default to false preparatory to removing it completely, r=gerv
This commit is contained in:
parent
1eacdc7280
commit
83f842a831
@ -1534,7 +1534,7 @@ pref("network.IDN_show_punycode", false);
|
||||
// "network.IDN_show_punycode" is false. In other words, all IDNs will be shown
|
||||
// in punycode if "network.IDN_show_punycode" is true.
|
||||
pref("network.IDN.restriction_profile", "moderate");
|
||||
pref("network.IDN.use_whitelist", true);
|
||||
pref("network.IDN.use_whitelist", false);
|
||||
|
||||
// ccTLDs
|
||||
pref("network.IDN.whitelist.ac", true);
|
||||
|
@ -22,35 +22,4 @@ function run_test() {
|
||||
do_check_eq(idnService.convertACEtoUTF8(reference[i][1]), reference[i][0]);
|
||||
do_check_eq(idnService.isACE(reference[i][1]), reference[i][2]);
|
||||
}
|
||||
|
||||
// add an IDN whitelist pref
|
||||
var pbi = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
pbi.setBoolPref("network.IDN.whitelist.es", true);
|
||||
|
||||
// After bug 722299, set network.IDN.restriction_profile to "ASCII" in
|
||||
// order not to change the behaviour of non-whitelisted TLDs
|
||||
var oldProfile = pbi.getCharPref("network.IDN.restriction_profile", "moderate");
|
||||
pbi.setCharPref("network.IDN.restriction_profile", "ASCII");
|
||||
|
||||
// check convertToDisplayIDN against the whitelist
|
||||
var isASCII = {};
|
||||
do_check_eq(idnService.convertToDisplayIDN("b\u00FCcher.es", isASCII), "b\u00FCcher.es");
|
||||
do_check_eq(isASCII.value, false);
|
||||
do_check_eq(idnService.convertToDisplayIDN("xn--bcher-kva.es", isASCII), "b\u00FCcher.es");
|
||||
do_check_eq(isASCII.value, false);
|
||||
do_check_eq(idnService.convertToDisplayIDN("b\u00FCcher.uk", isASCII), "xn--bcher-kva.uk");
|
||||
do_check_eq(isASCII.value, true);
|
||||
do_check_eq(idnService.convertToDisplayIDN("xn--bcher-kva.uk", isASCII), "xn--bcher-kva.uk");
|
||||
do_check_eq(isASCII.value, true);
|
||||
|
||||
// check ACE TLD's are handled by the whitelist
|
||||
pbi.setBoolPref("network.IDN.whitelist.xn--k-dha", true);
|
||||
do_check_eq(idnService.convertToDisplayIDN("test.\u00FCk", isASCII), "test.\u00FCk");
|
||||
do_check_eq(isASCII.value, false);
|
||||
do_check_eq(idnService.convertToDisplayIDN("test.xn--k-dha", isASCII), "test.\u00FCk");
|
||||
do_check_eq(isASCII.value, false);
|
||||
|
||||
// reset pref to default
|
||||
pbi.setCharPref("network.IDN.restriction_profile", oldProfile);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user