mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1204012: Lightweight themes are disabled if any add-ons are detected or modified during startup. r=rhelmer
When a lightweight theme is active the default theme is the selected skin but the default theme's addon object is marked as inactive (to deal with the horror of only allowing the user to select a single theme through the UI). During startup we should only switch back to the default theme if there is a non-default skin selected that we didn't see.
This commit is contained in:
parent
a4ebe821fd
commit
35eedaa625
@ -2118,8 +2118,10 @@ this.XPIDatabaseReconcile = {
|
||||
}
|
||||
}
|
||||
|
||||
// None of the active add-ons match the selected theme, enable the default.
|
||||
if (!sawActiveTheme) {
|
||||
// If a custom theme is selected and it wasn't seen in the new list of
|
||||
// active add-ons then enable the default theme
|
||||
if (XPIProvider.selectedSkin != XPIProvider.defaultSkin && !sawActiveTheme) {
|
||||
logger.info("Didn't see selected skin " + XPIProvider.selectedSkin);
|
||||
XPIProvider.enableDefaultTheme();
|
||||
}
|
||||
|
||||
|
@ -1089,7 +1089,51 @@ function run_test_21() {
|
||||
p1.userDisabled = false;
|
||||
ensure_test_completed();
|
||||
|
||||
end_test();
|
||||
run_test_22();
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
// Detecting a new add-on during the startup file check should not disable an
|
||||
// active lightweight theme
|
||||
function run_test_22() {
|
||||
restartManager();
|
||||
|
||||
AddonManager.getAddonsByIDs(["default@tests.mozilla.org",
|
||||
"1@personas.mozilla.org"], function([d, p1]) {
|
||||
do_check_true(d.userDisabled);
|
||||
do_check_false(d.appDisabled);
|
||||
do_check_false(d.isActive);
|
||||
|
||||
do_check_false(p1.userDisabled);
|
||||
do_check_false(p1.appDisabled);
|
||||
do_check_true(p1.isActive);
|
||||
|
||||
writeInstallRDFForExtension({
|
||||
id: "theme3@tests.mozilla.org",
|
||||
version: "1.0",
|
||||
name: "Test 3",
|
||||
internalName: "theme3/1.0",
|
||||
targetApplications: [{
|
||||
id: "xpcshell@tests.mozilla.org",
|
||||
minVersion: "1",
|
||||
maxVersion: "2"
|
||||
}]
|
||||
}, profileDir);
|
||||
|
||||
restartManager();
|
||||
|
||||
AddonManager.getAddonsByIDs(["default@tests.mozilla.org",
|
||||
"1@personas.mozilla.org"], function([d, p1]) {
|
||||
do_check_true(d.userDisabled);
|
||||
do_check_false(d.appDisabled);
|
||||
do_check_false(d.isActive);
|
||||
|
||||
do_check_false(p1.userDisabled);
|
||||
do_check_false(p1.appDisabled);
|
||||
do_check_true(p1.isActive);
|
||||
|
||||
end_test();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user