Bug 1519434 - remove plugin click to play pref as running without it won't make sense anymore, r=aswan

Differential Revision: https://phabricator.services.mozilla.com/D34212

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Gijs Kruitbosch 2019-06-13 08:40:59 +00:00
Родитель 87dddd801b
Коммит 38159f5246
33 изменённых файлов: 11 добавлений и 85 удалений

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

@ -706,7 +706,6 @@ pref("accessibility.typeaheadfind.flashBar", 1);
pref("accessibility.support.url", "https://support.mozilla.org/%LOCALE%/kb/accessibility-services");
pref("accessibility.indicator.enabled", false);
pref("plugins.click_to_play", true);
pref("plugins.testmode", false);
// Should plugins that are hidden show the infobar UI?

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

@ -1038,7 +1038,6 @@ add_task(async function test_click_to_play_blocked_plugin() {
{
maybeScreenshotsPresent: true,
preCheckContextMenuFn() {
pushPrefs(["plugins.click_to_play", true]);
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
},
postCheckContextMenuFn() {

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

@ -6,7 +6,6 @@ add_task(async function() {
clearAllPluginPermissions();
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
Services.prefs.clearUserPref("plugins.click_to_play");
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
gBrowser.removeCurrentTab();
window.focus();
@ -19,7 +18,6 @@ add_task(async function() {
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
Services.prefs.setBoolPref("plugins.click_to_play", true);
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
let bindingPromise = BrowserTestUtils.waitForContentEvent(gBrowser.selectedBrowser, "PluginBindingAttached", true, null, true);
await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");

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

@ -41,7 +41,6 @@ add_task(async function setup() {
env.set("MOZ_CRASHREPORTER_NO_REPORT", "");
env.set("MOZ_CRASHREPORTER_URL", SERVER_URL);
Services.prefs.setBoolPref("plugins.click_to_play", true);
Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
registerCleanupFunction(function cleanUp() {
@ -49,7 +48,6 @@ add_task(async function setup() {
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
env.set("MOZ_CRASHREPORTER_NO_REPORT", noReport);
env.set("MOZ_CRASHREPORTER_URL", serverURL);
Services.prefs.clearUserPref("plugins.click_to_play");
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
window.focus();
});

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

@ -6,7 +6,6 @@ add_task(async function() {
clearAllPluginPermissions();
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
Services.prefs.clearUserPref("plugins.click_to_play");
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
gNewWindow.close();
await BrowserTestUtils.waitForEvent(gNewWindow, "unload", true);
@ -16,7 +15,6 @@ add_task(async function() {
});
add_task(async function() {
Services.prefs.setBoolPref("plugins.click_to_play", true);
Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);

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

@ -7,7 +7,6 @@ add_task(async function() {
clearAllPluginPermissions();
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
Services.prefs.clearUserPref("plugins.click_to_play");
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
gBrowser.removeCurrentTab();
window.focus();
@ -19,8 +18,6 @@ add_task(async function() {
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
Services.prefs.setBoolPref("plugins.click_to_play", true);
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Second Test Plug-in");

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

@ -6,7 +6,6 @@ add_task(async function() {
clearAllPluginPermissions();
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
Services.prefs.clearUserPref("plugins.click_to_play");
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
gBrowser.removeCurrentTab();
window.focus();
@ -18,7 +17,6 @@ add_task(async function() {
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
Services.prefs.setBoolPref("plugins.click_to_play", true);
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_iframe.html");

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

@ -7,7 +7,6 @@ add_task(async function() {
clearAllPluginPermissions();
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
Services.prefs.clearUserPref("plugins.click_to_play");
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
gBrowser.removeCurrentTab();
window.focus();
@ -15,7 +14,6 @@ add_task(async function() {
});
add_task(async function() {
Services.prefs.setBoolPref("plugins.click_to_play", true);
Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);

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

@ -8,7 +8,6 @@ add_task(async function() {
clearAllPluginPermissions();
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
Services.prefs.clearUserPref("plugins.click_to_play");
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
gBrowser.removeCurrentTab();
window.focus();
@ -17,7 +16,6 @@ add_task(async function() {
});
add_task(async function() {
Services.prefs.setBoolPref("plugins.click_to_play", true);
Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
let newTab = BrowserTestUtils.addTab(gBrowser);

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

@ -7,7 +7,6 @@ add_task(async function() {
clearAllPluginPermissions();
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
Services.prefs.clearUserPref("plugins.click_to_play");
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
gBrowser.removeCurrentTab();
window.focus();
@ -16,7 +15,6 @@ add_task(async function() {
});
add_task(async function() {
Services.prefs.setBoolPref("plugins.click_to_play", true);
Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
let newTab = BrowserTestUtils.addTab(gBrowser);

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

@ -10,7 +10,6 @@ add_task(async function() {
clearAllPluginPermissions();
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
Services.prefs.clearUserPref("plugins.click_to_play");
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
FullZoom.reset(); // must be called before closing the tab we zoomed!
gBrowser.removeCurrentTab();
@ -20,7 +19,6 @@ add_task(async function() {
});
add_task(async function() {
Services.prefs.setBoolPref("plugins.click_to_play", true);
Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);

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

@ -11,7 +11,6 @@ add_task(async function() {
registerCleanupFunction(async function() {
clearAllPluginPermissions();
updateAllTestPlugins(Ci.nsIPluginTag.STATE_ENABLED);
Services.prefs.clearUserPref("plugins.click_to_play");
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins", gTestBrowser);
resetBlocklist();
@ -28,7 +27,6 @@ add_task(async function() {
updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
Services.prefs.setBoolPref("plugins.click_to_play", true);
// Prime the content process
await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html>hi</html>");

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

@ -6,7 +6,6 @@ add_task(async function() {
registerCleanupFunction(async function() {
clearAllPluginPermissions();
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
Services.prefs.clearUserPref("plugins.click_to_play");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins", gTestBrowser);
@ -19,7 +18,6 @@ add_task(async function() {
add_task(async function() {
Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
Services.prefs.setBoolPref("plugins.click_to_play", true);
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
gTestBrowser = gBrowser.selectedBrowser;

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

@ -4,7 +4,6 @@ var gTestBrowser = null;
add_task(async function() {
registerCleanupFunction(async function() {
clearAllPluginPermissions();
Services.prefs.clearUserPref("plugins.click_to_play");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins", gTestBrowser);
@ -21,7 +20,6 @@ add_task(async function() {
gTestBrowser = gBrowser.selectedBrowser;
Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
Services.prefs.setBoolPref("plugins.click_to_play", true);
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Second Test Plug-in");

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

@ -13,7 +13,6 @@ add_task(async function() {
registerCleanupFunction(function() {
gTestBrowser.removeEventListener("PluginBindingAttached", pluginBindingAttached, true, true);
clearAllPluginPermissions();
Services.prefs.clearUserPref("plugins.click_to_play");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
gBrowser.removeCurrentTab();
@ -26,8 +25,6 @@ add_task(async function() {
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
gTestBrowser = gBrowser.selectedBrowser;
Services.prefs.setBoolPref("plugins.click_to_play", true);
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
BrowserTestUtils.addContentEventListener(gTestBrowser, "PluginBindingAttached", pluginBindingAttached, true, null, true);

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

@ -5,7 +5,6 @@ var gWrapperClickCount = 0;
add_task(async function() {
registerCleanupFunction(function() {
clearAllPluginPermissions();
Services.prefs.clearUserPref("plugins.click_to_play");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
gBrowser.removeCurrentTab();
@ -15,8 +14,6 @@ add_task(async function() {
});
add_task(async function() {
Services.prefs.setBoolPref("plugins.click_to_play", true);
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
gTestBrowser = gBrowser.selectedBrowser;

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

@ -8,7 +8,6 @@ add_task(async function() {
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins", gTestBrowser);
resetBlocklist();
Services.prefs.clearUserPref("plugins.click_to_play");
gBrowser.removeCurrentTab();
window.focus();
gTestBrowser = null;
@ -16,7 +15,6 @@ add_task(async function() {
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
gTestBrowser = gBrowser.selectedBrowser;
Services.prefs.setBoolPref("plugins.click_to_play", true);
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
// Prime the blocklist service, the remote service doesn't launch on startup.

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

@ -4,7 +4,6 @@ var gTestBrowser = null;
add_task(async function() {
registerCleanupFunction(function() {
clearAllPluginPermissions();
Services.prefs.clearUserPref("plugins.click_to_play");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
gBrowser.removeCurrentTab();
@ -14,8 +13,6 @@ add_task(async function() {
});
add_task(async function() {
Services.prefs.setBoolPref("plugins.click_to_play", true);
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
gTestBrowser = gBrowser.selectedBrowser;

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

@ -5,7 +5,6 @@ var gNumPluginBindingsAttached = 0;
add_task(async function() {
registerCleanupFunction(function() {
clearAllPluginPermissions();
Services.prefs.clearUserPref("plugins.click_to_play");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
gBrowser.removeCurrentTab();
@ -15,8 +14,6 @@ add_task(async function() {
});
add_task(async function() {
Services.prefs.setBoolPref("plugins.click_to_play", true);
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
gTestBrowser = gBrowser.selectedBrowser;

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

@ -32,7 +32,6 @@ function stored(needles) {
add_task(async function() {
registerCleanupFunction(function() {
clearAllPluginPermissions();
Services.prefs.clearUserPref("plugins.click_to_play");
Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
@ -43,8 +42,6 @@ add_task(async function() {
gTestBrowser = null;
});
Services.prefs.setBoolPref("plugins.click_to_play", true);
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
});

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

@ -10,7 +10,6 @@ function updateAllTestPlugins(aState) {
add_task(async function() {
registerCleanupFunction(async function() {
clearAllPluginPermissions();
Services.prefs.clearUserPref("plugins.click_to_play");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins", gTestBrowser);
@ -26,7 +25,6 @@ add_task(async function() {
gTestBrowser = gBrowser.selectedBrowser;
Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
Services.prefs.setBoolPref("plugins.click_to_play", true);
updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);

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

@ -10,7 +10,6 @@ function updateAllTestPlugins(aState) {
add_task(async function() {
registerCleanupFunction(async function() {
clearAllPluginPermissions();
Services.prefs.clearUserPref("plugins.click_to_play");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins", gTestBrowser);
@ -26,7 +25,6 @@ add_task(async function() {
gTestBrowser = gBrowser.selectedBrowser;
Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
Services.prefs.setBoolPref("plugins.click_to_play", true);
updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);

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

@ -40,7 +40,6 @@ add_task(async function test() {
gTestBrowser = gBrowser.selectedBrowser;
let promise = BrowserTestUtils.browserLoaded(gTestBrowser);
Services.prefs.setBoolPref("plugins.click_to_play", true);
getTestPlugin().enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
getTestPlugin("Second Test Plug-in").enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
await promise;

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

@ -121,10 +121,6 @@ add_task(async function testPluginData() {
BrowserTestUtils.removeTab(tab);
}
Services.prefs.setBoolPref("plugins.click_to_play", true);
registerCleanupFunction(function() {
Services.prefs.clearUserPref("plugins.click_to_play");
});
PLUGIN_TAG.enabledState = Ci.nsIPluginTag.STATE_ENABLED;
await extension.startup();

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

@ -7,7 +7,6 @@
<script type="application/javascript" src="plugin-utils.js"></script>
<script type="application/javascript">
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
Services.prefs.setBoolPref("plugins.click_to_play", true);
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_CLICKTOPLAY);
</script>
</head>
@ -74,7 +73,6 @@
ok(false, "plugin.getMouseUpEventCount() shouldn't throw");
}
Services.prefs.clearUserPref("plugins.click_to_play");
SimpleTest.finish();
}

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

@ -9,7 +9,6 @@
<body>
<script class="testbody" type="application/javascript">
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
Services.prefs.setBoolPref("plugins.click_to_play", true);
var pluginHost = Cc["@mozilla.org/plugin/host;1"]
.getService(Ci.nsIPluginHost);
@ -28,8 +27,6 @@
testPlugin.enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
is(pluginHost.getStateForType("application/x-test"), Ci.nsIPluginTag.STATE_CLICKTOPLAY, "click-to-play should be on for Test Plug-in now");
Services.prefs.clearUserPref("plugins.click_to_play");
</script>
</body>
</html>

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

@ -3073,8 +3073,6 @@ pref("input_event_queue.default_duration_per_event", 1);
pref("input_event_queue.count_for_prediction", 9);
pref("plugins.load_appdir_plugins", false);
// If true, plugins will be click to play
pref("plugins.click_to_play", false);
// This only supports one hidden ctp plugin, edit nsPluginArray.cpp if adding a second
pref("plugins.navigator.hidden_ctp_plugin", "");

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

@ -13,7 +13,6 @@ var classifierTester = {
NEVER_ACTIVATE_PREF_VALUE: 0,
ASK_TO_ACTIVATE_PREF_VALUE: 1,
ALWAYS_ACTIVATE_PREF_VALUE: 2,
ALLOW_CTA_PREF: "plugins.click_to_play",
dbUrls: [
{
@ -66,7 +65,6 @@ var classifierTester = {
flashBlockEnable);
Services.prefs.setIntPref(classifierTester.FLASH_PLUGIN_USER_SETTING_PREF,
flashSetting);
Services.prefs.setBoolPref(classifierTester.ALLOW_CTA_PREF, true);
},
unsetPrefs() {
@ -77,7 +75,6 @@ var classifierTester = {
Services.prefs.clearUserPref(classifierTester.URLCLASSIFIER_DISALLOW_COMPLETIONS_PREF);
Services.prefs.clearUserPref(classifierTester.FLASHBLOCK_ENABLE_PREF);
Services.prefs.clearUserPref(classifierTester.FLASH_PLUGIN_USER_SETTING_PREF);
Services.prefs.clearUserPref(classifierTester.ALLOW_CTA_PREF);
},
// The |domains| property describes the domains of the nested documents making

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

@ -305,10 +305,11 @@ PluginWrapper.prototype = {
if (tag.disabled)
return true;
if ((Services.prefs.getBoolPref("plugins.click_to_play") && tag.clicktoplay) ||
if (tag.clicktoplay ||
this.blocklistState == Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE ||
this.blocklistState == Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE)
this.blocklistState == Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE) {
return AddonManager.STATE_ASK_TO_ACTIVATE;
}
return false;
},
@ -457,17 +458,14 @@ PluginWrapper.prototype = {
if (this.userDisabled !== true)
permissions |= AddonManager.PERM_CAN_DISABLE;
if (this.userDisabled !== AddonManager.STATE_ASK_TO_ACTIVATE) {
permissions |= AddonManager.PERM_CAN_ASK_TO_ACTIVATE;
}
let blocklistState = this.blocklistState;
let isCTPBlocklisted =
(blocklistState == Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE ||
blocklistState == Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE);
if (this.userDisabled !== AddonManager.STATE_ASK_TO_ACTIVATE &&
(Services.prefs.getBoolPref("plugins.click_to_play") ||
isCTPBlocklisted)) {
permissions |= AddonManager.PERM_CAN_ASK_TO_ACTIVATE;
}
if (this.userDisabled !== false && !isCTPBlocklisted) {
permissions |= AddonManager.PERM_CAN_ENABLE;
}

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

@ -146,9 +146,6 @@ async function getTestPluginAddon() {
}
async function test_CTP_plugins(aboutAddonsType) {
await SpecialPowers.pushPrefEnv({"set": [
["plugins.click_to_play", true],
]});
let pluginTag = getTestPluginTag();
pluginTag.enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
let managerWindow = await open_manager("addons://list/plugin");

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

@ -208,9 +208,8 @@ add_task(async function test_disable_blocklist() {
Assert.notEqual(blocklistState, Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE);
Assert.notEqual(blocklistState, Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE);
// it should still be possible to make a plugin click-to-play via the pref
// and setting that plugin's enabled state to click-to-play
Services.prefs.setBoolPref("plugins.click_to_play", true);
// it should still be possible to make a plugin click-to-play
// by setting that plugin's enabled state to click-to-play
let previousEnabledState = plugin.enabledState;
plugin.enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
Assert.equal(gPluginHost.getStateForType("application/x-test"), Ci.nsIPluginTag.STATE_CLICKTOPLAY);

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

@ -23,7 +23,6 @@ function setTestPluginState(state) {
async function run_test() {
do_test_pending();
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
Services.prefs.setBoolPref("plugins.click_to_play", true);
Services.prefs.setBoolPref("plugin.load_flash_only", false);
setTestPluginState(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
@ -181,7 +180,5 @@ async function run_test_4() {
Assert.notEqual(p, null);
Assert.equal(p.name, "Shockwave Flash");
Services.prefs.clearUserPref("plugins.click_to_play");
executeSoon(do_test_finished);
}

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

@ -75,7 +75,6 @@ add_task(async function setup() {
registerCleanupFunction(function() {
Services.prefs.clearUserPref("extensions.blocklist.url");
Services.prefs.clearUserPref("extensions.blocklist.enabled");
Services.prefs.clearUserPref("plugins.click_to_play");
});
});
@ -152,9 +151,8 @@ add_task(async function test_disable_blocklist() {
Assert.notEqual(blocklistState, Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE);
Assert.notEqual(blocklistState, Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE);
// it should still be possible to make a plugin click-to-play via the pref
// and setting that plugin's enabled state to click-to-play
Services.prefs.setBoolPref("plugins.click_to_play", true);
// it should still be possible to make a plugin click-to-play
// by setting that plugin's enabled state to click-to-play
let previousEnabledState = plugin.enabledState;
plugin.enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
Assert.equal(gPluginHost.getStateForType("application/x-test"), Ci.nsIPluginTag.STATE_CLICKTOPLAY);