Bug 1315405: Enable some tests that are missing from the manifests. r?aswan
Back when we switched to using test manifest files it looks like some tests
were missed. This adds them to the manifests and fixes the one test that was
failing. It failed because we were only setting the tooltip for buttons if the
button was visible. This change makes the tooltip always be set regardless.
MozReview-Commit-ID: 9Qoqr4BkCMY
--- a/toolkit/mozapps/extensions/content/extensions.xml
+++ b/toolkit/mozapps/extensions/content/extensions.xml
@@ -1330,40 +1330,41 @@
}
let hasActivatePermission =
["ask_to_activate", "enable", "disable"].some(perm => this.hasPermission(perm));
this._stateMenulist.disabled = !hasActivatePermission;
this._stateMenulist.hidden = false;
this._stateMenulist.classList.add('no-auto-hide');
} else {
this._stateMenulist.hidden = true;
+
+ let enableTooltip = gViewController.commands["cmd_enableItem"]
+ .getTooltip(this.mAddon);
+ this._enableBtn.setAttribute("tooltiptext", enableTooltip);
if (this.hasPermission("enable")) {
this._enableBtn.hidden = false;
- let tooltip = gViewController.commands["cmd_enableItem"]
- .getTooltip(this.mAddon);
- this._enableBtn.setAttribute("tooltiptext", tooltip);
} else {
this._enableBtn.hidden = true;
}
+ let disableTooltip = gViewController.commands["cmd_disableItem"]
+ .getTooltip(this.mAddon);
+ this._disableBtn.setAttribute("tooltiptext", disableTooltip);
if (this.hasPermission("disable")) {
this._disableBtn.hidden = false;
- let tooltip = gViewController.commands["cmd_disableItem"]
- .getTooltip(this.mAddon);
- this._disableBtn.setAttribute("tooltiptext", tooltip);
} else {
this._disableBtn.hidden = true;
}
}
+ let uninstallTooltip = gViewController.commands["cmd_uninstallItem"]
+ .getTooltip(this.mAddon);
+ this._removeBtn.setAttribute("tooltiptext", uninstallTooltip);
if (this.hasPermission("uninstall")) {
this._removeBtn.hidden = false;
- let tooltip = gViewController.commands["cmd_uninstallItem"]
- .getTooltip(this.mAddon);
- this._removeBtn.setAttribute("tooltiptext", tooltip);
} else {
this._removeBtn.hidden = true;
}
this.setAttribute("active", this.mAddon.isActive);
var showProgress = this.mAddon.purchaseURL || (this.mAddon.install &&
this.mAddon.install.state != AddonManager.STATE_INSTALLED);
--- a/toolkit/mozapps/extensions/test/browser/browser-common.ini
+++ b/toolkit/mozapps/extensions/test/browser/browser-common.ini
@@ -8,16 +8,17 @@ skip-if = os == 'linux' || os == 'win' #
skip-if = os == 'win' && !debug # Disabled on Windows opt/PGO builds due to intermittent failures (bug 1135866)
[browser_bug562899.js]
skip-if = buildapp == 'mulet'
[browser_bug562992.js]
[browser_bug567127.js]
[browser_bug567137.js]
[browser_bug570760.js]
[browser_bug572561.js]
+[browser_bug573062.js]
[browser_bug577990.js]
[browser_bug580298.js]
[browser_bug581076.js]
[browser_bug586574.js]
[browser_bug587970.js]
[browser_bug591465.js]
[browser_bug591663.js]
[browser_bug593535.js]
--- a/toolkit/mozapps/extensions/test/browser/browser_bug573062.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug573062.js
@@ -47,19 +47,19 @@ function test() {
case "no-restart-required":
no_r_Item = addonItem;
break;
}
}
// Check the buttons in the list view.
function checkTooltips(aItem, aEnable, aDisable, aRemove) {
- ok(aItem._enableBtn.getAttribute("tooltiptext") == aEnable);
- ok(aItem._disableBtn.getAttribute("tooltiptext") == aDisable);
- ok(aItem._removeBtn.getAttribute("tooltiptext") == aRemove);
+ is(aItem._enableBtn.getAttribute("tooltiptext"), aEnable);
+ is(aItem._disableBtn.getAttribute("tooltiptext"), aDisable);
+ is(aItem._removeBtn.getAttribute("tooltiptext"), aRemove);
}
let strs = aWindow.gStrings.ext;
addonList.selectedItem = ed_r_Item;
let ed_args = [ed_r_Item,
strs.GetStringFromName("enableAddonRestartRequiredTooltip"),
strs.GetStringFromName("disableAddonRestartRequiredTooltip"),
strs.GetStringFromName("uninstallAddonTooltip")];
@@ -72,17 +72,17 @@ function test() {
strs.GetStringFromName("uninstallAddonRestartRequiredTooltip")];
checkTooltips.apply(null, un_args);
addonList.selectedItem = no_r_Item;
let no_args = [no_r_Item,
strs.GetStringFromName("enableAddonTooltip"),
strs.GetStringFromName("disableAddonTooltip"),
strs.GetStringFromName("uninstallAddonTooltip")];
- checkTooltips.apply(null, no_args)
+ checkTooltips.apply(null, no_args);
// Check the buttons in the details view.
function checkTooltips2(aItem, aEnable, aDisable, aRemove) {
let detailEnable = aWindow.document.getElementById("detail-enable-btn");
let detailDisable = aWindow.document.getElementById("detail-disable-btn");
let detailUninstall = aWindow.document.getElementById("detail-uninstall-btn");
ok(detailEnable.getAttribute("tooltiptext") == aEnable);
ok(detailDisable.getAttribute("tooltiptext") == aDisable);
--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini
+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini
@@ -204,16 +204,17 @@ skip-if = true
[test_install.js]
[test_install_icons.js]
# Bug 676992: test consistently hangs on Android
skip-if = os == "android"
[test_install_strictcompat.js]
# Bug 676992: test consistently hangs on Android
skip-if = os == "android"
run-sequentially = Uses hardcoded ports in xpi files.
+[test_isDebuggable.js]
[test_locale.js]
[test_locked.js]
[test_locked2.js]
[test_locked_strictcompat.js]
[test_manifest.js]
[test_mapURIToAddonID.js]
# Same as test_bootstrap.js
skip-if = os == "android"
--- a/toolkit/mozapps/extensions/test/xpinstall/browser.ini
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser.ini
@@ -61,16 +61,17 @@ skip-if = true # disabled due to a leak.
skip-if = true # Bug 1084646
[browser_corrupt.js]
[browser_datauri.js]
[browser_empty.js]
[browser_enabled.js]
[browser_enabled2.js]
[browser_enabled3.js]
[browser_hash.js]
+[browser_hash2.js]
[browser_httphash.js]
[browser_httphash2.js]
[browser_httphash3.js]
[browser_httphash4.js]
[browser_httphash5.js]
[browser_httphash6.js]
[browser_installchrome.js]
[browser_localfile.js]