зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1249074: Don't offer existing sideloaded add-ons to users when creating a new profile. r=rhelmer
MozReview-Commit-ID: 7pnZhEvGRfj --HG-- extra : rebase_source : 67e53f74a7d48f8a59e7fbf333879c9919e2f79b
This commit is contained in:
Родитель
2967cf9b23
Коммит
83e5f07a79
|
@ -1723,7 +1723,10 @@ this.XPIDatabaseReconcile = {
|
|||
logger.warn("Disabling foreign installed add-on " + aNewAddon.id + " in "
|
||||
+ aInstallLocation.name);
|
||||
aNewAddon.userDisabled = true;
|
||||
aNewAddon.seen = false;
|
||||
|
||||
// If we don't have an old app version then this is a new profile in
|
||||
// which case just mark any sideloaded add-ons as already seen.
|
||||
aNewAddon.seen = !aOldAppVersion;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
const ID = "bootstrap1@tests.mozilla.org";
|
||||
|
||||
Services.prefs.setIntPref("extensions.enabledScopes",
|
||||
AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_SYSTEM);
|
||||
|
||||
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
|
||||
|
||||
BootstrapMonitor.init();
|
||||
|
||||
const globalDir = gProfD.clone();
|
||||
globalDir.append("extensions2");
|
||||
globalDir.append(gAppInfo.ID);
|
||||
registerDirectory("XRESysSExtPD", globalDir.parent);
|
||||
const profileDir = gProfD.clone();
|
||||
profileDir.append("extensions");
|
||||
|
||||
// By default disable add-ons from the system
|
||||
Services.prefs.setIntPref("extensions.autoDisableScopes", AddonManager.SCOPE_SYSTEM);
|
||||
|
||||
// When new add-ons already exist in a system location when starting with a new
|
||||
// profile they should be marked as already seen.
|
||||
add_task(function*() {
|
||||
manuallyInstall(do_get_addon("test_bootstrap1_1"), globalDir, ID);
|
||||
|
||||
startupManager();
|
||||
|
||||
let addon = yield promiseAddonByID(ID);
|
||||
do_check_true(addon.foreignInstall);
|
||||
do_check_true(addon.seen);
|
||||
do_check_true(addon.userDisabled);
|
||||
do_check_false(addon.isActive);
|
||||
|
||||
BootstrapMonitor.checkAddonInstalled(ID);
|
||||
BootstrapMonitor.checkAddonNotStarted(ID);
|
||||
|
||||
yield promiseShutdownManager();
|
||||
});
|
|
@ -285,6 +285,7 @@ skip-if = os == "android"
|
|||
run-sequentially = Uses hardcoded ports in xpi files.
|
||||
[test_json_updatecheck.js]
|
||||
[test_seen.js]
|
||||
[test_seen_newprofile.js]
|
||||
[test_updateid.js]
|
||||
# Bug 676992: test consistently hangs on Android
|
||||
skip-if = os == "android"
|
||||
|
|
|
@ -32,4 +32,5 @@ skip-if = appname != "firefox"
|
|||
[test_temporary.js]
|
||||
[test_proxy.js]
|
||||
|
||||
|
||||
[include:xpcshell-shared.ini]
|
||||
|
|
Загрузка…
Ссылка в новой задаче