Bug 1447903: Part 3d - Update test_corrupt.js to use only bootstrapped extensions. r?aswan
MozReview-Commit-ID: IIEp4DeoKnl
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -100,17 +100,16 @@ const LEGACY_NON_RESTARTLESS_TESTS = new
"test_bug576735.js",
"test_bug595573.js",
"test_bug655254.js",
"test_bug659772.js",
"test_bug753900.js",
"test_cacheflush.js",
"test_checkcompatibility.js",
"test_compatoverrides.js",
- "test_corrupt.js",
"test_dataDirectory.js",
"test_disable.js",
"test_distribution.js",
"test_error.js",
"test_filepointer.js",
"test_install.js",
"test_invalid_install_rdf.js",
"test_isDebuggable.js",
--- a/toolkit/mozapps/extensions/test/xpcshell/test_corrupt.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_corrupt.js
@@ -12,71 +12,23 @@ var testserver = AddonTestUtils.createHt
testserver.registerDirectory("/addons/", do_get_file("addons"));
testserver.registerDirectory("/data/", do_get_file("data"));
// The test extension uses an insecure update url.
Services.prefs.setBoolPref(PREF_EM_CHECK_UPDATE_SECURITY, false);
Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, false);
const ADDONS = {
- // Will be enabled
- "addon1@tests.mozilla.org": {
- "install.rdf": {
- id: "addon1@tests.mozilla.org",
- version: "1.0",
- name: "Test 1",
- targetApplications: [{
- id: "xpcshell@tests.mozilla.org",
- minVersion: "2",
- maxVersion: "2"
- }]
- },
- desiredState: {
- isActive: true,
- userDisabled: false,
- appDisabled: false,
- pendingOperations: 0,
- },
- // Should be correctly recovered
- afterCorruption: {},
- afterSecondRestart: {},
- },
-
- // Will be disabled
- "addon2@tests.mozilla.org": {
- "install.rdf": {
- id: "addon2@tests.mozilla.org",
- version: "1.0",
- name: "Test 2",
- targetApplications: [{
- id: "xpcshell@tests.mozilla.org",
- minVersion: "2",
- maxVersion: "2"
- }]
- },
- initialState: {
- userDisabled: true,
- },
- desiredState: {
- isActive: false,
- userDisabled: true,
- appDisabled: false,
- pendingOperations: 0,
- },
- // Should be correctly recovered
- afterCorruption: {},
- afterSecondRestart: {},
- },
-
// Will get a compatibility update and stay enabled
"addon3@tests.mozilla.org": {
"install.rdf": {
id: "addon3@tests.mozilla.org",
version: "1.0",
name: "Test 3",
+ bootstrap: true,
updateURL: "http://example.com/data/test_corrupt.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
maxVersion: "1"
}]
},
findUpdates: true,
@@ -93,16 +45,17 @@ const ADDONS = {
},
// Will get a compatibility update and be enabled
"addon4@tests.mozilla.org": {
"install.rdf": {
id: "addon4@tests.mozilla.org",
version: "1.0",
name: "Test 4",
+ bootstrap: true,
updateURL: "http://example.com/data/test_corrupt.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
maxVersion: "1"
}]
},
initialState: {
@@ -124,16 +77,17 @@ const ADDONS = {
},
// Would stay incompatible with strict compat
"addon5@tests.mozilla.org": {
"install.rdf": {
id: "addon5@tests.mozilla.org",
version: "1.0",
name: "Test 5",
+ bootstrap: true,
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
maxVersion: "1"
}]
},
desiredState: {
isActive: true,