Backed out changeset 99fa761b384e (bug 1528338) for causing xpc failures in test_handlerService_store.

This commit is contained in:
smolnar 2021-04-08 17:14:23 +03:00
Родитель a6b5bde696
Коммит 2df62ffdd4
4 изменённых файлов: 43 добавлений и 0 удалений

Просмотреть файл

@ -906,6 +906,26 @@ pref("gecko.handlerService.schemes.mailto.2.uriTemplate", "chrome://browser-regi
pref("gecko.handlerService.schemes.mailto.3.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.mailto.3.uriTemplate", "chrome://browser-region/locale/region.properties");
// irc
pref("gecko.handlerService.schemes.irc.0.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.irc.0.uriTemplate", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.irc.1.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.irc.1.uriTemplate", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.irc.2.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.irc.2.uriTemplate", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.irc.3.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.irc.3.uriTemplate", "chrome://browser-region/locale/region.properties");
// ircs
pref("gecko.handlerService.schemes.ircs.0.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.ircs.0.uriTemplate", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.ircs.1.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.ircs.1.uriTemplate", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.ircs.2.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.ircs.2.uriTemplate", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.ircs.3.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.ircs.3.uriTemplate", "chrome://browser-region/locale/region.properties");
pref("browser.geolocation.warning.infoURL", "https://www.mozilla.org/%LOCALE%/firefox/geolocation/");
pref("browser.xr.warning.infoURL", "https://www.mozilla.org/%LOCALE%/firefox/xr/");

Просмотреть файл

@ -14,3 +14,11 @@ gecko.handlerService.schemes.mailto.0.name=Yahoo! Mail
gecko.handlerService.schemes.mailto.0.uriTemplate=https://compose.mail.yahoo.com/?To=%s
gecko.handlerService.schemes.mailto.1.name=Gmail
gecko.handlerService.schemes.mailto.1.uriTemplate=https://mail.google.com/mail/?extsrc=mailto&url=%s
# The default set of protocol handlers for irc:
gecko.handlerService.schemes.irc.0.name=Mibbit
gecko.handlerService.schemes.irc.0.uriTemplate=https://www.mibbit.com/?url=%s
# The default set of protocol handlers for ircs:
gecko.handlerService.schemes.ircs.0.name=Mibbit
gecko.handlerService.schemes.ircs.0.uriTemplate=https://www.mibbit.com/?url=%s

Просмотреть файл

@ -234,6 +234,8 @@ function run_test() {
var handlerTypes = ["nonexistent/type", "nonexistent/type2"];
if (haveDefaultHandlersVersion) {
handlerTypes.push("mailto");
handlerTypes.push("irc");
handlerTypes.push("ircs");
}
for (let handler of handlerSvc.enumerate()) {
Assert.notEqual(handlerTypes.indexOf(handler.type), -1);

Просмотреть файл

@ -560,6 +560,19 @@ add_task(async function test_getTypeFromExtension() {
function assertAllHandlerInfosMatchDefaultHandlers() {
let handlerInfos = HandlerServiceTestUtils.getAllHandlerInfos();
for (let type of ["irc", "ircs"]) {
HandlerServiceTestUtils.assertHandlerInfoMatches(handlerInfos.shift(), {
type,
preferredActionOSDependent: true,
possibleApplicationHandlers: [
{
name: "Mibbit",
uriTemplate: "https://www.mibbit.com/?url=%s",
},
],
});
}
HandlerServiceTestUtils.assertHandlerInfoMatches(handlerInfos.shift(), {
type: "mailto",
preferredActionOSDependent: true,