Bug 1231784 - Fix toolkit/mozapps/update/chrome tests, r=rstrong
--- a/testing/mochitest/install.rdf
+++ b/testing/mochitest/install.rdf
@@ -7,17 +7,18 @@
<em:version>1.0</em:version>
#ifdef MOCHITEST_BOOTSTRAP
<em:bootstrap>true</em:bootstrap>
#endif
<em:targetApplication>
<Description>
<em:id>toolkit@mozilla.org</em:id>
#expand <em:minVersion>__MOZILLA_VERSION_U__</em:minVersion>
-#expand <em:maxVersion>__MOZILLA_VERSION_U__</em:maxVersion>
+ <!-- Set to * so toolkit/mozapps/update/chrome tests pass. -->
+ <em:maxVersion>*</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Front End MetaData -->
<em:name>Mochitest</em:name>
<em:description>Mochikit test harness</em:description>
<em:creator>Joel Maher</em:creator>
</Description>
</RDF>
--- a/toolkit/mozapps/update/tests/chrome/utils.js
+++ b/toolkit/mozapps/update/tests/chrome/utils.js
@@ -1290,27 +1290,28 @@ function setupAddons(aCallback) {
setNoUpdateAddonsDisabledState();
return;
}
// Disable all pre-existing enabled addons so they don't interfere with the
// tests.
AddonManager.getAllAddons(function(aAddons) {
let disabledAddons = [];
+ let harnessAddons = ["special-powers@mozilla.org", "mochikit@mozilla.org"];
aAddons.forEach(function(aAddon) {
// If an addon's type equals plugin it is skipped since
// checking plugins compatibility information isn't supported at this
// time (also see bug 566787). Also, SCOPE_APPLICATION add-ons are
// excluded by app update so there is no reason to disable them.
- // Specialpowers is excluded as the test harness requires it to run
- // the tests.
+ // Specialpowers and mochikit are excluded as the test harness requires
+ // them to run the tests.
if (aAddon.type != "plugin" && !aAddon.appDisabled &&
!aAddon.userDisabled &&
aAddon.scope != AddonManager.SCOPE_APPLICATION &&
- aAddon.id != "special-powers@mozilla.org") {
+ harnessAddons.indexOf(aAddon.id) == -1) {
disabledAddons.push(aAddon);
aAddon.userDisabled = true;
}
});
// If there are no pre-existing add-ons the preference value will be an
// empty string.
Services.prefs.setCharPref(PREF_DISABLEDADDONS, disabledAddons.join(" "));