mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
back out 15e15fead382 (Bug 693743) for timeouts in Linux crashtest, jsreftest, and reftest suites
This commit is contained in:
parent
a17e0c8eeb
commit
dadc8670dd
@ -77,7 +77,7 @@ pref("extensions.update.autoUpdateDefault", true);
|
||||
// Disable add-ons installed into the shared user and shared system areas by
|
||||
// default. This does not include the application directory. See the SCOPE
|
||||
// constants in AddonManager.jsm for values to use here
|
||||
pref("extensions.autoDisableScopes", 15);
|
||||
pref("extensions.autoDisableScopes", 10);
|
||||
|
||||
// Dictionary download preference
|
||||
pref("browser.dictionaries.download.url", "https://addons.mozilla.org/%LOCALE%/firefox/dictionaries/");
|
||||
|
@ -433,8 +433,6 @@ user_pref("toolkit.telemetry.prompted", true);
|
||||
// Only load extensions from the application and user profile
|
||||
// AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION
|
||||
user_pref("extensions.enabledScopes", 5);
|
||||
// Allow dropped in extensions in the application and user profile
|
||||
user_pref("extensions.autoDisableScopes", 10);
|
||||
// Disable metadata caching for installed add-ons by default
|
||||
user_pref("extensions.getAddons.cache.enabled", false);
|
||||
// Disable intalling any distribution add-ons
|
||||
|
@ -556,10 +556,6 @@ AddonWrapper.prototype = {
|
||||
return AddonManager.SCOPE_PROFILE;
|
||||
},
|
||||
|
||||
get foreignInstall() {
|
||||
return false;
|
||||
},
|
||||
|
||||
// Lightweight themes are always compatible
|
||||
isCompatibleWith: function(appVersion, platformVersion) {
|
||||
return true;
|
||||
|
@ -339,10 +339,6 @@ PluginWrapper.prototype = {
|
||||
return true;
|
||||
},
|
||||
|
||||
get foreignInstall() {
|
||||
return true;
|
||||
},
|
||||
|
||||
isCompatibleWith: function(aAppVerison, aPlatformVersion) {
|
||||
return true;
|
||||
},
|
||||
|
@ -122,7 +122,7 @@ const TOOLKIT_ID = "toolkit@mozilla.org";
|
||||
|
||||
const BRANCH_REGEXP = /^([^\.]+\.[0-9]+[a-z]*).*/gi;
|
||||
|
||||
const DB_SCHEMA = 6;
|
||||
const DB_SCHEMA = 5;
|
||||
const REQ_VERSION = 2;
|
||||
|
||||
#ifdef MOZ_COMPATIBILITY_NIGHTLY
|
||||
@ -146,7 +146,7 @@ const DB_METADATA = ["installDate", "updateDate", "size", "sourceURI",
|
||||
"releaseNotesURI", "applyBackgroundUpdates"];
|
||||
const DB_BOOL_METADATA = ["visible", "active", "userDisabled", "appDisabled",
|
||||
"pendingUninstall", "bootstrap", "skinnable",
|
||||
"softDisabled", "foreignInstall"];
|
||||
"softDisabled"];
|
||||
|
||||
const BOOTSTRAP_REASONS = {
|
||||
APP_STARTUP : 1,
|
||||
@ -2556,16 +2556,10 @@ var XPIProvider = {
|
||||
newAddon = aManifests[aInstallLocation.name][aId];
|
||||
|
||||
try {
|
||||
// Otherwise the add-on has appeared in the install location.
|
||||
// Otherwise load the manifest from the add-on
|
||||
if (!newAddon) {
|
||||
// Load the manifest from the add-on.
|
||||
let file = aInstallLocation.getLocationForID(aId);
|
||||
newAddon = loadManifestFromFile(file);
|
||||
|
||||
// The default theme is never a foreign install
|
||||
if (newAddon.type != "theme" || newAddon.internalName != XPIProvider.defaultSkin)
|
||||
newAddon.foreignInstall = true;
|
||||
|
||||
}
|
||||
// The add-on in the manifest should match the add-on ID.
|
||||
if (newAddon.id != aId)
|
||||
@ -2589,10 +2583,9 @@ var XPIProvider = {
|
||||
newAddon.installDate = aAddonState.mtime;
|
||||
newAddon.updateDate = aAddonState.mtime;
|
||||
|
||||
// Check if the add-on is a foreign install and is in a scope where
|
||||
// add-ons that were dropped in should default to disabled.
|
||||
// Check if the add-on is in a scope where add-ons should install disabled
|
||||
let disablingScopes = Prefs.getIntPref(PREF_EM_AUTO_DISABLED_SCOPES, 0);
|
||||
if (newAddon.foreignInstall && aInstallLocation.scope & disablingScopes)
|
||||
if (aInstallLocation.scope & disablingScopes)
|
||||
newAddon.userDisabled = true;
|
||||
|
||||
// If there is migration data then apply it.
|
||||
@ -2612,8 +2605,6 @@ var XPIProvider = {
|
||||
newAddon.sourceURI = aMigrateData.sourceURI;
|
||||
if ("releaseNotesURI" in aMigrateData)
|
||||
newAddon.releaseNotesURI = aMigrateData.releaseNotesURI;
|
||||
if ("foreignInstall" in aMigrateData)
|
||||
newAddon.foreignInstall = aMigrateData.foreignInstall;
|
||||
|
||||
// Some properties should only be migrated if the add-on hasn't changed.
|
||||
// The version property isn't a perfect check for this but covers the
|
||||
@ -3869,8 +3860,7 @@ const FIELDS_ADDON = "internal_id, id, location, version, type, internalName, "
|
||||
"iconURL, icon64URL, defaultLocale, visible, active, " +
|
||||
"userDisabled, appDisabled, pendingUninstall, descriptor, " +
|
||||
"installDate, updateDate, applyBackgroundUpdates, bootstrap, " +
|
||||
"skinnable, size, sourceURI, releaseNotesURI, softDisabled, " +
|
||||
"foreignInstall";
|
||||
"skinnable, size, sourceURI, releaseNotesURI, softDisabled";
|
||||
|
||||
/**
|
||||
* A helper function to log an SQL error.
|
||||
@ -4015,8 +4005,7 @@ var XPIDatabase = {
|
||||
":userDisabled, :appDisabled, :pendingUninstall, " +
|
||||
":descriptor, :installDate, :updateDate, " +
|
||||
":applyBackgroundUpdates, :bootstrap, :skinnable, " +
|
||||
":size, :sourceURI, :releaseNotesURI, :softDisabled, " +
|
||||
":foreignInstall)",
|
||||
":size, :sourceURI, :releaseNotesURI, :softDisabled)",
|
||||
addAddonMetadata_addon_locale: "INSERT INTO addon_locale VALUES " +
|
||||
"(:internal_id, :name, :locale)",
|
||||
addAddonMetadata_locale: "INSERT INTO locale (name, description, creator, " +
|
||||
@ -4382,9 +4371,6 @@ var XPIDatabase = {
|
||||
// Build a list of sql statements that might recover useful data from this
|
||||
// and future versions of the schema
|
||||
var sql = [];
|
||||
sql.push("SELECT internal_id, id, location, userDisabled, " +
|
||||
"softDisabled, installDate, version, applyBackgroundUpdates, " +
|
||||
"sourceURI, releaseNotesURI, foreignInstall FROM addon");
|
||||
sql.push("SELECT internal_id, id, location, userDisabled, " +
|
||||
"softDisabled, installDate, version, applyBackgroundUpdates, " +
|
||||
"sourceURI, releaseNotesURI FROM addon");
|
||||
@ -4427,8 +4413,6 @@ var XPIDatabase = {
|
||||
migrateData[row.location][row.id].sourceURI = row.sourceURI;
|
||||
if ("releaseNotesURI" in row)
|
||||
migrateData[row.location][row.id].releaseNotesURI = row.releaseNotesURI;
|
||||
if ("foreignInstall" in row)
|
||||
migrateData[row.location][row.id].foreignInstall = row.foreignInstall;
|
||||
}
|
||||
|
||||
var taStmt = this.connection.createStatement("SELECT id, minVersion, " +
|
||||
@ -4549,7 +4533,6 @@ var XPIDatabase = {
|
||||
"bootstrap INTEGER, skinnable INTEGER, " +
|
||||
"size INTEGER, sourceURI TEXT, " +
|
||||
"releaseNotesURI TEXT, softDisabled INTEGER, " +
|
||||
"foreignInstall INTEGER, " +
|
||||
"UNIQUE (id, location)");
|
||||
this.connection.createTable("targetApplication",
|
||||
"addon_internal_id INTEGER, " +
|
||||
@ -5224,7 +5207,6 @@ var XPIDatabase = {
|
||||
this.removeAddonMetadata(aOldAddon);
|
||||
aNewAddon.installDate = aOldAddon.installDate;
|
||||
aNewAddon.applyBackgroundUpdates = aOldAddon.applyBackgroundUpdates;
|
||||
aNewAddon.foreignInstall = aOldAddon.foreignInstall;
|
||||
aNewAddon.active = (aNewAddon.visible && !aNewAddon.userDisabled &&
|
||||
!aNewAddon.appDisabled)
|
||||
this.addAddonMetadata(aNewAddon, aDescriptor);
|
||||
@ -6840,7 +6822,6 @@ AddonInternal.prototype = {
|
||||
softDisabled: false,
|
||||
sourceURI: null,
|
||||
releaseNotesURI: null,
|
||||
foreignInstall: false,
|
||||
|
||||
get selectedLocale() {
|
||||
if (this._selectedLocale)
|
||||
@ -7113,7 +7094,7 @@ function AddonWrapper(aAddon) {
|
||||
|
||||
["id", "version", "type", "isCompatible", "isPlatformCompatible",
|
||||
"providesUpdatesSecurely", "blocklistState", "blocklistURL", "appDisabled",
|
||||
"softDisabled", "skinnable", "size", "foreignInstall"].forEach(function(aProp) {
|
||||
"softDisabled", "skinnable", "size"].forEach(function(aProp) {
|
||||
this.__defineGetter__(aProp, function() aAddon[aProp]);
|
||||
}, this);
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>addon7@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test 7</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>2</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
@ -89,7 +89,6 @@ function run_test_1() {
|
||||
do_check_eq(a1.version, "1.0");
|
||||
do_check_true(a1.isActive);
|
||||
do_check_eq(a1.scope, AddonManager.SCOPE_PROFILE);
|
||||
do_check_false(a1.foreignInstall);
|
||||
|
||||
run_test_2();
|
||||
});
|
||||
@ -123,7 +122,6 @@ function run_test_3() {
|
||||
do_check_eq(a1.version, "2.0");
|
||||
do_check_true(a1.isActive);
|
||||
do_check_eq(a1.scope, AddonManager.SCOPE_PROFILE);
|
||||
do_check_false(a1.foreignInstall);
|
||||
|
||||
run_test_4();
|
||||
});
|
||||
|
@ -163,7 +163,6 @@ function check_test_1() {
|
||||
do_check_true(do_get_addon("test_install1").exists());
|
||||
do_check_in_crash_annotation(a1.id, a1.version);
|
||||
do_check_eq(a1.size, ADDON1_SIZE);
|
||||
do_check_false(a1.foreignInstall);
|
||||
|
||||
do_check_eq(a1.sourceURI.spec,
|
||||
Services.io.newFileURI(do_get_addon("test_install1")).spec);
|
||||
@ -383,7 +382,6 @@ function check_test_5(install) {
|
||||
do_check_in_crash_annotation(a2.id, a2.version);
|
||||
do_check_eq(a2.sourceURI.spec,
|
||||
"http://localhost:4444/addons/test_install2_2.xpi");
|
||||
do_check_false(a2.foreignInstall);
|
||||
|
||||
do_check_eq(a2.installDate.getTime(), gInstallDate);
|
||||
// Update date should be later (or the same if this test is too fast)
|
||||
|
@ -111,31 +111,29 @@ function prepare_profile() {
|
||||
a6.userDisabled = true;
|
||||
|
||||
a6.findUpdates({
|
||||
onUpdateAvailable: function(aAddon, aInstall6) {
|
||||
AddonManager.getInstallForURL("http://localhost:4444/addons/test_migrate4_7.xpi", function(aInstall7) {
|
||||
completeAllInstalls([aInstall6, aInstall7], function() {
|
||||
restartManager();
|
||||
onUpdateAvailable: function(aAddon, aInstall) {
|
||||
completeAllInstalls([aInstall], function() {
|
||||
restartManager();
|
||||
|
||||
AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
|
||||
"addon2@tests.mozilla.org",
|
||||
"addon3@tests.mozilla.org",
|
||||
"addon4@tests.mozilla.org",
|
||||
"addon5@tests.mozilla.org",
|
||||
"addon6@tests.mozilla.org"],
|
||||
function([a1, a2, a3, a4, a5, a6]) {
|
||||
a3.userDisabled = true;
|
||||
a4.userDisabled = false;
|
||||
AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
|
||||
"addon2@tests.mozilla.org",
|
||||
"addon3@tests.mozilla.org",
|
||||
"addon4@tests.mozilla.org",
|
||||
"addon5@tests.mozilla.org",
|
||||
"addon6@tests.mozilla.org"],
|
||||
function([a1, a2, a3, a4, a5, a6]) {
|
||||
a3.userDisabled = true;
|
||||
a4.userDisabled = false;
|
||||
|
||||
a5.findUpdates({
|
||||
onUpdateFinished: function() {
|
||||
shutdownManager();
|
||||
a5.findUpdates({
|
||||
onUpdateFinished: function() {
|
||||
shutdownManager();
|
||||
|
||||
perform_migration();
|
||||
}
|
||||
}, AddonManager.UPDATE_WHEN_USER_REQUESTED);
|
||||
});
|
||||
perform_migration();
|
||||
}
|
||||
}, AddonManager.UPDATE_WHEN_USER_REQUESTED);
|
||||
});
|
||||
}, "application/x-xpinstall");
|
||||
});
|
||||
}
|
||||
}, AddonManager.UPDATE_WHEN_USER_REQUESTED);
|
||||
});
|
||||
@ -168,16 +166,14 @@ function test_results() {
|
||||
"addon3@tests.mozilla.org",
|
||||
"addon4@tests.mozilla.org",
|
||||
"addon5@tests.mozilla.org",
|
||||
"addon6@tests.mozilla.org",
|
||||
"addon7@tests.mozilla.org"],
|
||||
function([a1, a2, a3, a4, a5, a6, a7]) {
|
||||
"addon6@tests.mozilla.org"],
|
||||
function([a1, a2, a3, a4, a5, a6]) {
|
||||
// addon1 was enabled
|
||||
do_check_neq(a1, null);
|
||||
do_check_false(a1.userDisabled);
|
||||
do_check_false(a1.appDisabled);
|
||||
do_check_true(a1.isActive);
|
||||
do_check_true(a1.applyBackgroundUpdates);
|
||||
do_check_true(a1.foreignInstall);
|
||||
|
||||
// addon2 was disabled
|
||||
do_check_neq(a2, null);
|
||||
@ -185,7 +181,6 @@ function test_results() {
|
||||
do_check_false(a2.appDisabled);
|
||||
do_check_false(a2.isActive);
|
||||
do_check_false(a2.applyBackgroundUpdates);
|
||||
do_check_true(a2.foreignInstall);
|
||||
|
||||
// addon3 was pending-disable in the database
|
||||
do_check_neq(a3, null);
|
||||
@ -193,7 +188,6 @@ function test_results() {
|
||||
do_check_false(a3.appDisabled);
|
||||
do_check_false(a3.isActive);
|
||||
do_check_true(a3.applyBackgroundUpdates);
|
||||
do_check_true(a3.foreignInstall);
|
||||
|
||||
// addon4 was pending-enable in the database
|
||||
do_check_neq(a4, null);
|
||||
@ -201,7 +195,6 @@ function test_results() {
|
||||
do_check_false(a4.appDisabled);
|
||||
do_check_true(a4.isActive);
|
||||
do_check_true(a4.applyBackgroundUpdates);
|
||||
do_check_true(a4.foreignInstall);
|
||||
|
||||
// addon5 was enabled in the database but needed a compatibiltiy update
|
||||
do_check_neq(a5, null);
|
||||
@ -209,7 +202,6 @@ function test_results() {
|
||||
do_check_false(a5.appDisabled);
|
||||
do_check_true(a5.isActive);
|
||||
do_check_true(a5.applyBackgroundUpdates);
|
||||
do_check_true(a5.foreignInstall);
|
||||
|
||||
// addon6 was disabled and compatible but a new version has been installed
|
||||
do_check_neq(a6, null);
|
||||
@ -218,20 +210,8 @@ function test_results() {
|
||||
do_check_false(a6.appDisabled);
|
||||
do_check_false(a6.isActive);
|
||||
do_check_true(a6.applyBackgroundUpdates);
|
||||
do_check_true(a6.foreignInstall);
|
||||
do_check_eq(a6.sourceURI.spec, "http://localhost:4444/addons/test_migrate4_6.xpi");
|
||||
do_check_eq(a6.releaseNotesURI.spec, "http://example.com/updateInfo.xhtml");
|
||||
|
||||
// addon7 was installed manually
|
||||
do_check_neq(a7, null);
|
||||
do_check_eq(a7.version, "1.0");
|
||||
do_check_false(a7.userDisabled);
|
||||
do_check_false(a7.appDisabled);
|
||||
do_check_true(a7.isActive);
|
||||
do_check_true(a7.applyBackgroundUpdates);
|
||||
do_check_false(a7.foreignInstall);
|
||||
do_check_eq(a7.sourceURI.spec, "http://localhost:4444/addons/test_migrate4_7.xpi");
|
||||
do_check_eq(a7.releaseNotesURI, null);
|
||||
testserver.stop(do_test_finished);
|
||||
});
|
||||
}
|
||||
|
@ -202,7 +202,6 @@ function run_test_1() {
|
||||
do_check_in_crash_annotation(addon1.id, addon1.version);
|
||||
do_check_eq(a1.scope, AddonManager.SCOPE_PROFILE);
|
||||
do_check_eq(a1.sourceURI, null);
|
||||
do_check_true(a1.foreignInstall);
|
||||
|
||||
do_check_neq(a2, null);
|
||||
do_check_eq(a2.id, "addon2@tests.mozilla.org");
|
||||
@ -214,7 +213,6 @@ function run_test_1() {
|
||||
do_check_in_crash_annotation(addon2.id, addon2.version);
|
||||
do_check_eq(a2.scope, AddonManager.SCOPE_PROFILE);
|
||||
do_check_eq(a2.sourceURI, null);
|
||||
do_check_true(a2.foreignInstall);
|
||||
|
||||
do_check_neq(a3, null);
|
||||
do_check_eq(a3.id, "addon3@tests.mozilla.org");
|
||||
@ -226,7 +224,6 @@ function run_test_1() {
|
||||
do_check_in_crash_annotation(addon3.id, addon3.version);
|
||||
do_check_eq(a3.scope, AddonManager.SCOPE_PROFILE);
|
||||
do_check_eq(a3.sourceURI, null);
|
||||
do_check_true(a3.foreignInstall);
|
||||
|
||||
do_check_eq(a4, null);
|
||||
do_check_false(isExtensionInAddonsList(profileDir, "addon4@tests.mozilla.org"));
|
||||
@ -300,7 +297,6 @@ function run_test_2() {
|
||||
do_check_true(hasFlag(a1.permissions, AddonManager.PERM_CAN_UPGRADE));
|
||||
do_check_in_crash_annotation(addon1.id, a1.version);
|
||||
do_check_eq(a1.scope, AddonManager.SCOPE_PROFILE);
|
||||
do_check_true(a1.foreignInstall);
|
||||
|
||||
do_check_neq(a2, null);
|
||||
do_check_eq(a2.id, "addon2@tests.mozilla.org");
|
||||
@ -312,7 +308,6 @@ function run_test_2() {
|
||||
do_check_true(hasFlag(a2.permissions, AddonManager.PERM_CAN_UPGRADE));
|
||||
do_check_in_crash_annotation(addon2.id, a2.version);
|
||||
do_check_eq(a2.scope, AddonManager.SCOPE_PROFILE);
|
||||
do_check_true(a2.foreignInstall);
|
||||
|
||||
do_check_eq(a3, null);
|
||||
do_check_false(isExtensionInAddonsList(profileDir, "addon3@tests.mozilla.org"));
|
||||
|
@ -94,14 +94,12 @@ function run_test() {
|
||||
function([d, t1, t2]) {
|
||||
do_check_neq(d, null);
|
||||
do_check_false(d.skinnable);
|
||||
do_check_false(d.foreignInstall);
|
||||
|
||||
do_check_neq(t1, null);
|
||||
do_check_false(t1.userDisabled);
|
||||
do_check_false(t1.appDisabled);
|
||||
do_check_true(t1.isActive);
|
||||
do_check_true(t1.skinnable);
|
||||
do_check_true(t1.foreignInstall);
|
||||
do_check_eq(t1.screenshots, null);
|
||||
do_check_true(isThemeInAddonsList(profileDir, t1.id));
|
||||
do_check_false(hasFlag(t1.permissions, AddonManager.PERM_CAN_DISABLE));
|
||||
@ -114,7 +112,6 @@ function run_test() {
|
||||
do_check_false(t2.appDisabled);
|
||||
do_check_false(t2.isActive);
|
||||
do_check_false(t2.skinnable);
|
||||
do_check_true(t2.foreignInstall);
|
||||
do_check_eq(t2.screenshots, null);
|
||||
do_check_false(isThemeInAddonsList(profileDir, t2.id));
|
||||
do_check_false(hasFlag(t2.permissions, AddonManager.PERM_CAN_DISABLE));
|
||||
|
@ -90,7 +90,6 @@ function run_test_1() {
|
||||
do_check_eq(a1.version, "1.0");
|
||||
do_check_eq(a1.applyBackgroundUpdates, AddonManager.AUTOUPDATE_DEFAULT);
|
||||
do_check_eq(a1.releaseNotesURI, null);
|
||||
do_check_true(a1.foreignInstall);
|
||||
|
||||
a1.applyBackgroundUpdates = AddonManager.AUTOUPDATE_DEFAULT;
|
||||
|
||||
@ -220,7 +219,6 @@ function check_test_2() {
|
||||
do_check_true(isExtensionInAddonsList(profileDir, a1.id));
|
||||
do_check_eq(a1.applyBackgroundUpdates, AddonManager.AUTOUPDATE_DISABLE);
|
||||
do_check_eq(a1.releaseNotesURI.spec, "http://example.com/updateInfo.xhtml");
|
||||
do_check_true(a1.foreignInstall);
|
||||
|
||||
a1.uninstall();
|
||||
restartManager();
|
||||
|
Loading…
Reference in New Issue
Block a user