Bug 1833185 - Remove FlashPlugin policy r=mkaply

Differential Revision: https://phabricator.services.mozilla.com/D178080
This commit is contained in:
Gregory Pappas 2023-05-16 13:28:57 +00:00
parent 1885448293
commit d6a7291339
7 changed files with 4 additions and 80 deletions

View file

@ -1286,27 +1286,6 @@ export var Policies = {
},
},
FlashPlugin: {
onBeforeUIStartup(manager, param) {
addAllowDenyPermissions("plugin:flash", param.Allow, param.Block);
const FLASH_NEVER_ACTIVATE = 0;
const FLASH_ASK_TO_ACTIVATE = 1;
let flashPrefVal;
if (param.Default === undefined || param.Default) {
flashPrefVal = FLASH_ASK_TO_ACTIVATE;
} else {
flashPrefVal = FLASH_NEVER_ACTIVATE;
}
if (param.Locked) {
setAndLockPref("plugin.state.flash", flashPrefVal);
} else if (param.Default !== undefined) {
PoliciesUtils.setDefaultPref("plugin.state.flash", flashPrefVal);
}
},
},
GoToIntranetSiteForSingleWordEntryInAddressBar: {
onBeforeAddons(manager, param) {
setAndLockPref("browser.fixup.dns_first_for_single_words", param);

View file

@ -3,7 +3,7 @@
"BlockAboutProfiles": true,
"DontCheckDefaultBrowser": true,
"FlashPlugin": {
"InstallAddonsPermission": {
"Allow": ["https://www.example.com"],
"Block": ["https://www.example.org"]

View file

@ -682,35 +682,6 @@
}
},
"FlashPlugin": {
"type": "object",
"properties": {
"Allow": {
"type": "array",
"strict": false,
"items": {
"type": "origin"
}
},
"Block": {
"type": "array",
"strict": false,
"items": {
"type": "origin"
}
},
"Default": {
"type": "boolean"
},
"Locked": {
"type": "boolean"
}
}
},
"GoToIntranetSiteForSingleWordEntryInAddressBar": {
"type": "boolean"
},

View file

@ -12,12 +12,6 @@
"InstallAddonsPermission": {
"Allow": ["https://www.allow.com", "https://www.pre-existing-deny.com"]
},
"FlashPlugin": {
"Allow": ["https://www.allow.com", "https://www.pre-existing-deny.com"],
"Block": ["https://www.deny.com", "https://www.pre-existing-allow.com"]
}
}
}

View file

@ -17,13 +17,6 @@ add_task(async function test_setup_preexisting_permissions() {
Ci.nsIPermissionManager.EXPIRE_SESSION
);
PermissionTestUtils.add(
"https://www.pre-existing-allow.com",
"plugin:flash",
Ci.nsIPermissionManager.ALLOW_ACTION,
Ci.nsIPermissionManager.EXPIRE_SESSION
);
// Pre-existing DENY permissions that should be overriden
// with ALLOW.
PermissionTestUtils.add(
@ -46,17 +39,10 @@ add_task(async function test_setup_preexisting_permissions() {
Ci.nsIPermissionManager.DENY_ACTION,
Ci.nsIPermissionManager.EXPIRE_SESSION
);
PermissionTestUtils.add(
"https://www.pre-existing-deny.com",
"plugin:flash",
Ci.nsIPermissionManager.DENY_ACTION,
Ci.nsIPermissionManager.EXPIRE_SESSION
);
});
add_task(async function test_setup_activate_policies() {
await setupPolicyEngineWithJson("config_popups_cookies_addons_flash.json");
await setupPolicyEngineWithJson("config_popups_cookies_addons.json");
equal(
Services.policies.status,
Ci.nsIEnterprisePolicies.ACTIVE,
@ -112,10 +98,6 @@ add_task(async function test_cookies_policy() {
checkAllPermissionsForType("cookie");
});
add_task(async function test_flash_policy() {
checkAllPermissionsForType("plugin:flash");
});
add_task(async function test_change_permission() {
// Checks that changing a permission will still retain the
// value set through the engine.

View file

@ -21,8 +21,8 @@ support-files =
skip-if = os != 'mac'
[test_permissions.js]
[test_policy_search_engine.js]
[test_popups_cookies_addons_flash.js]
support-files = config_popups_cookies_addons_flash.json
[test_popups_cookies_addons.js]
support-files = config_popups_cookies_addons.json
[test_preferences.js]
[test_proxy.js]
[test_requestedlocales.js]

View file

@ -122,8 +122,6 @@ policy-ExtensionUpdate = Enable or disable automatic extension updates.
policy-FirefoxHome2 = Configure { -firefox-home-brand-name }.
policy-FlashPlugin = Allow or deny usage of the Flash plugin.
policy-GoToIntranetSiteForSingleWordEntryInAddressBar = Force direct intranet site navigation instead of searching when typing single word entries in the address bar.
policy-Handlers = Configure default application handlers.