Bug 1447903: Part 11b - Update test_strictcompatibility.js to use bootstrapped extensions. r?aswan
MozReview-Commit-ID: 4DES7jiBzmF
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -77,17 +77,16 @@ const LEGACY_NON_RESTARTLESS_TESTS = new
"test_bug455906.js",
"test_bug470377_1.js",
"test_bug470377_2.js",
"test_bug470377_3.js",
"test_bug470377_4.js",
"test_bug655254.js",
"test_checkcompatibility.js",
"test_signed_verify.js",
- "test_strictcompatibility.js",
"test_syncGUID.js",
"test_upgrade.js",
]);
if (LEGACY_NON_RESTARTLESS_TESTS.has(_TEST_FILE[0].replace(/.*\//, ""))) {
Services.prefs.setBoolPref("extensions.legacy.non-restartless.enabled", true);
}
--- a/toolkit/mozapps/extensions/test/xpcshell/test_strictcompatibility.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_strictcompatibility.js
@@ -10,16 +10,17 @@
// should be compatible in. It's pretty gross.
const ADDONS = {
// Always compatible
"addon1@tests.mozilla.org": {
"install.rdf": {
id: "addon1@tests.mozilla.org",
version: "1.0",
name: "Test 1",
+ bootstrap: true,
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
maxVersion: "1"
}]
},
expected: {
strictCompatibility: false,
@@ -28,16 +29,17 @@ const ADDONS = {
},
// Incompatible in strict compatibility mode
"addon2@tests.mozilla.org": {
"install.rdf": {
id: "addon2@tests.mozilla.org",
version: "1.0",
name: "Test 2",
+ bootstrap: true,
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "0.7",
maxVersion: "0.8"
}]
},
expected: {
strictCompatibility: false,
@@ -65,16 +67,17 @@ const ADDONS = {
},
// Opt-in to strict compatibility - always incompatible
"addon4@tests.mozilla.org": {
"install.rdf": {
id: "addon4@tests.mozilla.org",
version: "1.0",
name: "Test 4",
+ bootstrap: true,
strictCompatibility: true,
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "0.8",
maxVersion: "0.9"
}]
},
expected: {
@@ -85,16 +88,17 @@ const ADDONS = {
// Addon from the future - would be marked as compatibile-by-default,
// but minVersion is higher than the app version
"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: "3",
maxVersion: "5"
}]
},
expected: {
strictCompatibility: false,
@@ -104,16 +108,17 @@ const ADDONS = {
// Extremely old addon - maxVersion is less than the mimimum compat version
// set in extensions.minCompatibleVersion
"addon6@tests.mozilla.org": {
"install.rdf": {
id: "addon6@tests.mozilla.org",
version: "1.0",
name: "Test 6",
+ bootstrap: true,
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "0.1",
maxVersion: "0.2"
}]
},
expected: {
strictCompatibility: false,