Bug 1994791 - Chatbot policy should turn off context menu. a=pascalc DONTBUILD
Original Revision: https://phabricator.services.mozilla.com/D269272 Differential Revision: https://phabricator.services.mozilla.com/D270676
This commit is contained in:
committed by
pchevrel@mozilla.com
parent
3a7afc8674
commit
0a0e35c404
@@ -1581,15 +1581,17 @@ export var Policies = {
|
||||
const defaultValue = "Enabled" in param ? param.Enabled : undefined;
|
||||
|
||||
const features = [
|
||||
["Chatbot", "browser.ml.chat.enabled"],
|
||||
["LinkPreviews", "browser.ml.linkPreview.optin"],
|
||||
["TabGroups", "browser.tabs.groups.smart.userEnabled"],
|
||||
["Chatbot", ["browser.ml.chat.enabled", "browser.ml.chat.page"]],
|
||||
["LinkPreviews", ["browser.ml.linkPreview.optin"]],
|
||||
["TabGroups", ["browser.tabs.groups.smart.userEnabled"]],
|
||||
];
|
||||
|
||||
for (const [key, pref] of features) {
|
||||
for (const [key, prefs] of features) {
|
||||
const value = key in param ? param[key] : defaultValue;
|
||||
if (value !== undefined) {
|
||||
PoliciesUtils.setDefaultPref(pref, value, param.Locked);
|
||||
for (const pref of prefs) {
|
||||
PoliciesUtils.setDefaultPref(pref, value, param.Locked);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1199,6 +1199,23 @@ const POLICIES_TESTS = [
|
||||
"security.webauthn.always_allow_direct_attestation": true,
|
||||
},
|
||||
},
|
||||
|
||||
// GenerativeAI
|
||||
{
|
||||
policies: {
|
||||
GenerativeAI: {
|
||||
Enabled: false,
|
||||
Chatbot: true,
|
||||
Locked: true,
|
||||
},
|
||||
},
|
||||
lockedPrefs: {
|
||||
"browser.ml.chat.enabled": true,
|
||||
"browser.ml.chat.page": true,
|
||||
"browser.ml.linkPreview.optin": false,
|
||||
"browser.tabs.groups.smart.userEnabled": false,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
add_task(async function test_policy_simple_prefs() {
|
||||
|
||||
Reference in New Issue
Block a user