mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 599771: Update buttons in the Add-ons Manager to use a consistent id/anonid naming scheme. r+a=dtownsend
This commit is contained in:
parent
be21837bbf
commit
f79b3a195d
@ -660,7 +660,7 @@ var gViewController = {
|
||||
gViewController.updateCommand("cmd_findAllUpdates");
|
||||
document.getElementById("updates-noneFound").hidden = true;
|
||||
document.getElementById("updates-progress").hidden = false;
|
||||
document.getElementById("updates-manualUpdatesFound").hidden = true;
|
||||
document.getElementById("updates-manualUpdatesFound-btn").hidden = true;
|
||||
|
||||
var pendingChecks = 0;
|
||||
var numUpdated = 0;
|
||||
@ -679,7 +679,7 @@ var gViewController = {
|
||||
gUpdatesView.maybeRefresh();
|
||||
|
||||
if (numManualUpdates > 0 && numUpdated == 0) {
|
||||
document.getElementById("updates-manualUpdatesFound").hidden = false;
|
||||
document.getElementById("updates-manualUpdatesFound-btn").hidden = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -690,7 +690,7 @@ var gViewController = {
|
||||
|
||||
if (restartNeeded) {
|
||||
document.getElementById("updates-downloaded").hidden = false;
|
||||
document.getElementById("updates-restart").hidden = false;
|
||||
document.getElementById("updates-restart-btn").hidden = false;
|
||||
} else {
|
||||
document.getElementById("updates-installed").hidden = false;
|
||||
}
|
||||
@ -2003,13 +2003,13 @@ var gDetailView = {
|
||||
this._autoUpdate.hidden = false;
|
||||
this._autoUpdate.value = aAddon.applyBackgroundUpdates;
|
||||
let hideFindUpdates = shouldAutoUpdate(this._addon);
|
||||
document.getElementById("detail-findUpdates").hidden = hideFindUpdates;
|
||||
document.getElementById("detail-findUpdates-btn").hidden = hideFindUpdates;
|
||||
} else {
|
||||
this._autoUpdate.hidden = true;
|
||||
document.getElementById("detail-findUpdates").hidden = false;
|
||||
document.getElementById("detail-findUpdates-btn").hidden = false;
|
||||
}
|
||||
|
||||
document.getElementById("detail-prefs").hidden = !aIsRemote && !aAddon.optionsURL;
|
||||
document.getElementById("detail-prefs-btn").hidden = !aIsRemote && !aAddon.optionsURL;
|
||||
|
||||
var gridRows = document.querySelectorAll("#detail-grid rows row");
|
||||
for (var i = 0, first = true; i < gridRows.length; ++i) {
|
||||
@ -2183,7 +2183,7 @@ var gDetailView = {
|
||||
if (aProperties.indexOf("applyBackgroundUpdates") != -1) {
|
||||
this._autoUpdate.value = this._addon.applyBackgroundUpdates;
|
||||
let hideFindUpdates = shouldAutoUpdate(this._addon);
|
||||
document.getElementById("detail-findUpdates").hidden = hideFindUpdates;
|
||||
document.getElementById("detail-findUpdates-btn").hidden = hideFindUpdates;
|
||||
}
|
||||
},
|
||||
|
||||
@ -2213,7 +2213,7 @@ var gUpdatesView = {
|
||||
|
||||
this._categoryItem = gCategories.get("addons://updates/available");
|
||||
|
||||
this._updateSelected = document.getElementById("update-selected");
|
||||
this._updateSelected = document.getElementById("update-selected-btn");
|
||||
this._updateSelected.addEventListener("command", function() {
|
||||
gUpdatesView.installSelected();
|
||||
}, false);
|
||||
|
@ -166,12 +166,12 @@
|
||||
<xul:hbox class="end-cap"/>
|
||||
</xul:hbox>
|
||||
<xul:hbox class="status-container">
|
||||
<xul:button anonid="pause" class="pause"
|
||||
<xul:button anonid="pause-btn" class="pause"
|
||||
tooltiptext="&progress.pause.tooltip;"/>
|
||||
<xul:spacer flex="1"/>
|
||||
<xul:label anonid="status" class="status"/>
|
||||
<xul:spacer flex="1"/>
|
||||
<xul:button anonid="cancel" class="cancel"
|
||||
<xul:button anonid="cancel-btn" class="cancel"
|
||||
tooltiptext="&progress.cancel.tooltip;"/>
|
||||
</xul:hbox>
|
||||
</xul:stack>
|
||||
@ -189,10 +189,10 @@
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "progress");
|
||||
</field>
|
||||
<field name="_pause">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "pause");
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "pause-btn");
|
||||
</field>
|
||||
<field name="_cancel">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "cancel");
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "cancel-btn");
|
||||
</field>
|
||||
<field name="_status">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "status");
|
||||
@ -238,14 +238,14 @@
|
||||
<!-- Sorters - displays and controls the sort state of a list. -->
|
||||
<binding id="sorters">
|
||||
<content orient="horizontal">
|
||||
<xul:button anonid="btn-name" class="sorter"
|
||||
<xul:button anonid="name-btn" class="sorter"
|
||||
label="&sort.name.label;" tooltiptext="&sort.name.tooltip;"
|
||||
oncommand="this.parentNode._handleChange('name');"/>
|
||||
<xul:button anonid="btn-date" class="sorter"
|
||||
<xul:button anonid="date-btn" class="sorter"
|
||||
label="&sort.dateUpdated.label;"
|
||||
tooltiptext="&sort.dateUpdated.tooltip;"
|
||||
oncommand="this.parentNode._handleChange('dateUpdated');"/>
|
||||
<xul:button anonid="btn-relevance" class="sorter" hidden="true"
|
||||
<xul:button anonid="relevance-btn" class="sorter" hidden="true"
|
||||
label="&sort.relevance.label;"
|
||||
tooltiptext="&sort.relevance.tooltip;"
|
||||
oncommand="this.parentNode._handleChange('relevancescore');"/>
|
||||
@ -264,13 +264,13 @@
|
||||
|
||||
<field name="handler">null</field>
|
||||
<field name="_btnName">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "btn-name");
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "name-btn");
|
||||
</field>
|
||||
<field name="_btnDate">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "btn-date");
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "date-btn");
|
||||
</field>
|
||||
<field name="_btnRelevance">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "btn-relevance");
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "relevance-btn");
|
||||
</field>
|
||||
|
||||
<property name="sortBy">
|
||||
@ -472,11 +472,11 @@
|
||||
<content>
|
||||
<xul:label anonid="message"/>
|
||||
<xul:progressmeter anonid="progress" class="download-progress"/>
|
||||
<xul:button anonid="install-remote" hidden="true"
|
||||
<xul:button anonid="install-remote-btn" hidden="true"
|
||||
class="addon-control" label="&addon.install.label;"
|
||||
tooltiptext="&addon.install.tooltip;"
|
||||
oncommand="document.getBindingParent(this).installRemote();"/>
|
||||
<xul:button anonid="restart-install" hidden="true"
|
||||
<xul:button anonid="restart-install-btn" hidden="true"
|
||||
class="addon-control" label="&addon.install.label;"
|
||||
tooltiptext="&addon.install.tooltip;"
|
||||
oncommand="document.getBindingParent(this).restartInstall();"/>
|
||||
@ -505,7 +505,7 @@
|
||||
</field>
|
||||
<field name="_installRemote">
|
||||
document.getAnonymousElementByAttribute(this, "anonid",
|
||||
"install-remote");
|
||||
"install-remote-btn");
|
||||
</field>
|
||||
<field name="_restartNeeded">
|
||||
document.getAnonymousElementByAttribute(this, "anonid",
|
||||
@ -513,11 +513,11 @@
|
||||
</field>
|
||||
<field name="_restartInstall">
|
||||
document.getAnonymousElementByAttribute(this, "anonid",
|
||||
"restart-install");
|
||||
"restart-install-btn");
|
||||
</field>
|
||||
<field name="_undo">
|
||||
document.getAnonymousElementByAttribute(this, "anonid",
|
||||
"undo");
|
||||
"undo-btn");
|
||||
</field>
|
||||
|
||||
<method name="initWithInstall">
|
||||
@ -734,10 +734,10 @@
|
||||
class="pending">
|
||||
<xul:image class="pending-icon"/>
|
||||
<xul:label anonid="pending" flex="1"/>
|
||||
<xul:button class="button-link"
|
||||
<xul:button anonid="restart-btn" class="button-link"
|
||||
label="&addon.restartNow.label;"
|
||||
oncommand="document.getBindingParent(this).restart();"/>
|
||||
<xul:button anonid="undo" class="button-link"
|
||||
<xul:button anonid="undo-btn" class="button-link"
|
||||
label="&addon.undoAction.label;"
|
||||
tooltipText="&addon.undoAction.tooltip;"
|
||||
oncommand="document.getBindingParent(this).undo();"/>
|
||||
@ -768,7 +768,7 @@
|
||||
<xul:vbox flex="1">
|
||||
<xul:hbox align="center" class="description-container">
|
||||
<xul:label flex="1" anonid="description" class="description" crop="end"/>
|
||||
<xul:button class="details button-link"
|
||||
<xul:button anonid="details-btn" class="details button-link"
|
||||
label="&addon.details.label;"
|
||||
tooltiptext="&addon.details.tooltip;"
|
||||
oncommand="document.getBindingParent(this).showInDetailView();"/>
|
||||
@ -782,7 +782,7 @@
|
||||
<xul:vbox anonid="relnotes"/>
|
||||
</xul:vbox>
|
||||
<xul:hbox pack="start">
|
||||
<xul:button anonid="relnotes-toggle" class="relnotes-toggle"
|
||||
<xul:button anonid="relnotes-toggle-btn" class="relnotes-toggle"
|
||||
hidden="true" label="&cmd.showReleaseNotes.label;"
|
||||
tooltiptext="&cmd.showReleaseNotes.tooltip;"
|
||||
showlabel="&cmd.showReleaseNotes.label;"
|
||||
@ -997,7 +997,7 @@
|
||||
<field name="_relNotesLoaded">false</field>
|
||||
<field name="_relNotesToggle">
|
||||
document.getAnonymousElementByAttribute(this, "anonid",
|
||||
"relnotes-toggle");
|
||||
"relnotes-toggle-btn");
|
||||
</field>
|
||||
<field name="_relNotesLoading">
|
||||
document.getAnonymousElementByAttribute(this, "anonid",
|
||||
|
@ -151,7 +151,7 @@
|
||||
<image class="spinner"/>
|
||||
<label id="updates-noneFound" hidden="true"
|
||||
value="&updates.noneFound.label;"/>
|
||||
<button id="updates-manualUpdatesFound" class="button-link"
|
||||
<button id="updates-manualUpdatesFound-btn" class="button-link"
|
||||
hidden="true" label="&updates.manualUpdatesFound.label;"
|
||||
command="cmd_goToAvailableUpdates"/>
|
||||
<label id="updates-progress" hidden="true"
|
||||
@ -160,7 +160,7 @@
|
||||
value="&updates.installed.label;"/>
|
||||
<label id="updates-downloaded" hidden="true"
|
||||
value="&updates.downloaded.label;"/>
|
||||
<button id="updates-restart" class="button-link" hidden="true"
|
||||
<button id="updates-restart-btn" class="button-link" hidden="true"
|
||||
label="&updates.restart.label;"
|
||||
command="cmd_restartApp"/>
|
||||
</hbox>
|
||||
@ -382,7 +382,7 @@
|
||||
<spacer flex="3"/>
|
||||
</vbox>
|
||||
<hbox id="update-actions" pack="center">
|
||||
<button id="update-selected" hidden="true"
|
||||
<button id="update-selected-btn" hidden="true"
|
||||
label="&updates.updateSelected.label;"
|
||||
tooltiptext="&updates.updateSelected.tooltip;"/>
|
||||
</hbox>
|
||||
@ -438,13 +438,13 @@
|
||||
<hbox id="pending-container" align="center" class="pending">
|
||||
<image class="pending-icon"/>
|
||||
<label id="detail-pending" flex="1"/>
|
||||
<button class="button-link"
|
||||
label="&addon.restartNow.label;"
|
||||
command="cmd_restartApp"/>
|
||||
<button id="detail-undo" class="button-link"
|
||||
label="&addon.undoAction.label;"
|
||||
tooltipText="&addon.undoAction.tooltip;"
|
||||
command="cmd_cancelOperation"/>
|
||||
<button id="detail-restart-btn" class="button-link"
|
||||
label="&addon.restartNow.label;"
|
||||
command="cmd_restartApp"/>
|
||||
<button id="detail-undo-btn" class="button-link"
|
||||
label="&addon.undoAction.label;"
|
||||
tooltipText="&addon.undoAction.tooltip;"
|
||||
command="cmd_cancelOperation"/>
|
||||
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
|
||||
</hbox>
|
||||
</vbox>
|
||||
@ -472,7 +472,7 @@
|
||||
<hbox align="center">
|
||||
<label id="detail-contrib-suggested"/>
|
||||
<spacer flex="1"/>
|
||||
<button id="detail-contrib-button" class="addon-control"
|
||||
<button id="detail-contrib-btn" class="addon-control"
|
||||
label="&cmd.contribute.label;"
|
||||
accesskey="&cmd.contribute.accesskey;"
|
||||
tooltiptext="&cmd.contribute.tooltip;"
|
||||
@ -502,7 +502,7 @@
|
||||
tooltiptext="&detail.updateManual.tooltip;"
|
||||
value="0"/>
|
||||
</radiogroup>
|
||||
<button id="detail-findUpdates" class="button-link"
|
||||
<button id="detail-findUpdates-btn" class="button-link"
|
||||
label="&detail.checkForUpdates.label;"
|
||||
accesskey="&detail.checkForUpdates.accesskey;"
|
||||
tooltiptext="&detail.checkForUpdates.tooltip;"
|
||||
@ -530,7 +530,7 @@
|
||||
</rows>
|
||||
</grid>
|
||||
<hbox id="detail-controls">
|
||||
<button id="detail-prefs" class="addon-control"
|
||||
<button id="detail-prefs-btn" class="addon-control"
|
||||
#ifdef XP_WIN
|
||||
label="&detail.showPreferencesWin.label;"
|
||||
accesskey="&detail.showPreferencesWin.accesskey;"
|
||||
@ -542,19 +542,19 @@
|
||||
#endif
|
||||
command="cmd_showItemPreferences"/>
|
||||
<spacer flex="1"/>
|
||||
<button id="detail-uninstall" class="addon-control remove"
|
||||
<button id="detail-uninstall-btn" class="addon-control remove"
|
||||
label="&cmd.uninstallAddon.label;"
|
||||
accesskey="&cmd.uninstallAddon.accesskey;"
|
||||
command="cmd_uninstallItem"/>
|
||||
<button id="detail-enable" class="addon-control enable"
|
||||
<button id="detail-enable-btn" class="addon-control enable"
|
||||
label="&cmd.enableAddon.label;"
|
||||
accesskey="&cmd.enableAddon.accesskey;"
|
||||
command="cmd_enableItem"/>
|
||||
<button id="detail-disable" class="addon-control disable"
|
||||
<button id="detail-disable-btn" class="addon-control disable"
|
||||
label="&cmd.disableAddon.label;"
|
||||
accesskey="&cmd.disableAddon.accesskey;"
|
||||
command="cmd_disableItem"/>
|
||||
<button id="detail-install" class="addon-control install"
|
||||
<button id="detail-install-btn" class="addon-control install"
|
||||
label="&cmd.installAddon.label;"
|
||||
accesskey="&cmd.installAddon.accesskey;"
|
||||
command="cmd_installItem"/>
|
||||
|
@ -488,7 +488,7 @@ add_test(function() {
|
||||
info("Part 2");
|
||||
is_in_detail(aManager, "addons://list/extension", true, false);
|
||||
|
||||
EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("detail-uninstall"),
|
||||
EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("detail-uninstall-btn"),
|
||||
{ }, aManager);
|
||||
|
||||
wait_for_view_load(aManager, function() {
|
||||
|
@ -82,9 +82,9 @@ function test() {
|
||||
|
||||
// Check the buttons in the details view.
|
||||
function checkTooltips2(aItem, aEnable, aDisable, aRemove) {
|
||||
let detailEnable = aWindow.document.getElementById("detail-enable");
|
||||
let detailDisable = aWindow.document.getElementById("detail-disable");
|
||||
let detailUninstall = aWindow.document.getElementById("detail-uninstall");
|
||||
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);
|
||||
ok(detailUninstall.getAttribute("tooltiptext") == aRemove);
|
||||
|
@ -44,7 +44,7 @@ add_test(function() {
|
||||
var emptyNotice = gManagerWindow.document.getElementById("empty-availableUpdates-msg");
|
||||
is_element_visible(emptyNotice, "Empty notice should be visible");
|
||||
|
||||
var updateSelected = gManagerWindow.document.getElementById("update-selected");
|
||||
var updateSelected = gManagerWindow.document.getElementById("update-selected-btn");
|
||||
is_element_hidden(updateSelected, "Update Selected button should be hidden");
|
||||
|
||||
info("Adding updates");
|
||||
@ -85,7 +85,7 @@ add_test(function() {
|
||||
var emptyNotice = gManagerWindow.document.getElementById("empty-availableUpdates-msg");
|
||||
is_element_hidden(emptyNotice, "Empty notice should be hidden");
|
||||
|
||||
var updateSelected = gManagerWindow.document.getElementById("update-selected");
|
||||
var updateSelected = gManagerWindow.document.getElementById("update-selected-btn");
|
||||
is_element_visible(updateSelected, "Update Selected button should be visible");
|
||||
is(updateSelected.disabled, false, "Update Selected button should be enabled by default");
|
||||
|
||||
@ -136,7 +136,7 @@ add_test(function() {
|
||||
|
||||
|
||||
add_test(function() {
|
||||
var updateSelected = gManagerWindow.document.getElementById("update-selected");
|
||||
var updateSelected = gManagerWindow.document.getElementById("update-selected-btn");
|
||||
is(updateSelected.disabled, false, "Update Selected button should now be enabled");
|
||||
|
||||
var item1 = get_addon_element(gManagerWindow, "addon1@tests.mozilla.org");
|
||||
|
@ -171,19 +171,19 @@ add_test(function() {
|
||||
|
||||
is_element_visible(get("detail-autoUpdate"), "Updates should not be hidden");
|
||||
ok(get("detail-autoUpdate").childNodes[1].selected, "Updates ahould be automatic");
|
||||
is_element_hidden(get("detail-findUpdates"), "Check for updates should be hidden");
|
||||
is_element_hidden(get("detail-findUpdates-btn"), "Check for updates should be hidden");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-autoUpdate").lastChild, {}, gManagerWindow);
|
||||
ok(get("detail-autoUpdate").lastChild.selected, "Updates should be manual");
|
||||
is_element_visible(get("detail-findUpdates"), "Check for updates should be visible");
|
||||
is_element_visible(get("detail-findUpdates-btn"), "Check for updates should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-autoUpdate").firstChild, {}, gManagerWindow);
|
||||
ok(get("detail-autoUpdate").firstChild.selected, "Updates should be automatic");
|
||||
//XXX Disabled due to bug 596172
|
||||
// is_element_hidden(get("detail-findUpdates"), "Check for updates should be hidden");
|
||||
// is_element_hidden(get("detail-findUpdates-btn"), "Check for updates should be hidden");
|
||||
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable-btn"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -191,11 +191,11 @@ add_test(function() {
|
||||
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
|
||||
|
||||
// Disable it
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-disable"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-disable-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable-btn"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -206,10 +206,10 @@ add_test(function() {
|
||||
|
||||
// Reopen it
|
||||
open_details("addon1@tests.mozilla.org", "extension", function() {
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable-btn"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -219,11 +219,11 @@ add_test(function() {
|
||||
is(get("detail-pending").textContent, "Test add-on 1 will be disabled after you restart " + gApp + ".", "Pending message should be correct");
|
||||
|
||||
// Undo disabling
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-undo"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-undo-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable-btn"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -269,10 +269,10 @@ add_test(function() {
|
||||
|
||||
is_element_hidden(get("detail-updates-row"), "Updates should be hidden");
|
||||
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_hidden(get("detail-uninstall"), "Remove button should be hidden");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_hidden(get("detail-uninstall-btn"), "Remove button should be hidden");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -317,36 +317,36 @@ add_test(function() {
|
||||
|
||||
is_element_visible(get("detail-autoUpdate"), "Updates should not be hidden");
|
||||
ok(get("detail-autoUpdate").lastChild.selected, "Updates should be manual");
|
||||
is_element_visible(get("detail-findUpdates"), "Check for updates should be visible");
|
||||
is_element_visible(get("detail-findUpdates-btn"), "Check for updates should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-autoUpdate").childNodes[1], {}, gManagerWindow);
|
||||
ok(get("detail-autoUpdate").childNodes[1].selected, "Updates should be automatic");
|
||||
is_element_hidden(get("detail-findUpdates"), "Check for updates should be hidden");
|
||||
is_element_hidden(get("detail-findUpdates-btn"), "Check for updates should be hidden");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-autoUpdate").lastChild, {}, gManagerWindow);
|
||||
ok(get("detail-autoUpdate").lastChild.selected, "Updates should be manual");
|
||||
is_element_visible(get("detail-findUpdates"), "Check for updates should be visible");
|
||||
is_element_visible(get("detail-findUpdates-btn"), "Check for updates should be visible");
|
||||
|
||||
info("Setting " + PREF_AUTOUPDATE_DEFAULT + " to true");
|
||||
Services.prefs.setBoolPref(PREF_AUTOUPDATE_DEFAULT, true);
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-autoUpdate").firstChild, {}, gManagerWindow);
|
||||
ok(get("detail-autoUpdate").firstChild.selected, "Updates should be default");
|
||||
is_element_hidden(get("detail-findUpdates"), "Check for updates should be hidden");
|
||||
is_element_hidden(get("detail-findUpdates-btn"), "Check for updates should be hidden");
|
||||
|
||||
info("Setting " + PREF_AUTOUPDATE_DEFAULT + " to false");
|
||||
Services.prefs.setBoolPref(PREF_AUTOUPDATE_DEFAULT, false);
|
||||
ok(get("detail-autoUpdate").firstChild.selected, "Updates should be default");
|
||||
is_element_visible(get("detail-findUpdates"), "Check for updates should be visible");
|
||||
is_element_visible(get("detail-findUpdates-btn"), "Check for updates should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-autoUpdate").childNodes[1], {}, gManagerWindow);
|
||||
ok(get("detail-autoUpdate").childNodes[1].selected, "Updates should be automatic");
|
||||
is_element_hidden(get("detail-findUpdates"), "Check for updates should be hidden");
|
||||
is_element_hidden(get("detail-findUpdates-btn"), "Check for updates should be hidden");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-autoUpdate").firstChild, {}, gManagerWindow);
|
||||
ok(get("detail-autoUpdate").firstChild.selected, "Updates should be default");
|
||||
is_element_visible(get("detail-findUpdates"), "Check for updates should be visible");
|
||||
is_element_visible(get("detail-findUpdates-btn"), "Check for updates should be visible");
|
||||
Services.prefs.clearUserPref(PREF_AUTOUPDATE_DEFAULT);
|
||||
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_hidden(get("detail-uninstall"), "Remove button should be hidden");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_hidden(get("detail-uninstall-btn"), "Remove button should be hidden");
|
||||
|
||||
is_element_visible(get("detail-warning"), "Warning message should be visible");
|
||||
is(get("detail-warning").textContent, "Test add-on 3 is incompatible with " + gApp + " " + gVersion + ".", "Warning message should be correct");
|
||||
@ -364,10 +364,10 @@ add_test(function() {
|
||||
open_details("addon4@tests.mozilla.org", "extension", function() {
|
||||
is(get("detail-name").textContent, "Test add-on 4", "Name should be correct");
|
||||
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable-btn"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_visible(get("detail-warning"), "Warning message should be visible");
|
||||
is(get("detail-warning").textContent, "Test add-on 4 is known to cause security or stability issues.", "Warning message should be correct");
|
||||
@ -379,11 +379,11 @@ add_test(function() {
|
||||
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
|
||||
|
||||
// Enable it
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-enable"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-enable-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable-btn"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -394,10 +394,10 @@ add_test(function() {
|
||||
|
||||
// Reopen it
|
||||
open_details("addon4@tests.mozilla.org", "extension", function() {
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable-btn"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -407,11 +407,11 @@ add_test(function() {
|
||||
is(get("detail-pending").textContent, "Test add-on 4 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
|
||||
|
||||
// Undo enabling
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-undo"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-undo-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable-btn"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_visible(get("detail-warning"), "Warning message should be visible");
|
||||
is(get("detail-warning").textContent, "Test add-on 4 is known to cause security or stability issues.", "Warning message should be correct");
|
||||
@ -432,10 +432,10 @@ add_test(function() {
|
||||
open_details("addon5@tests.mozilla.org", "extension", function() {
|
||||
is(get("detail-name").textContent, "Test add-on 5", "Name should be correct");
|
||||
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -455,10 +455,10 @@ add_test(function() {
|
||||
open_details("addon6@tests.mozilla.org", "extension", function() {
|
||||
is(get("detail-name").textContent, "Test add-on 6", "Name should be correct");
|
||||
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable-btn"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -467,11 +467,11 @@ add_test(function() {
|
||||
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
|
||||
|
||||
// Disable it
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-disable"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-disable-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable-btn"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -481,10 +481,10 @@ add_test(function() {
|
||||
|
||||
// Reopen it
|
||||
open_details("addon6@tests.mozilla.org", "extension", function() {
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable-btn"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -493,11 +493,11 @@ add_test(function() {
|
||||
is_element_hidden(get("detail-pending"), "Pending message should be visible");
|
||||
|
||||
// Enable it
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-enable"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-enable-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable-btn"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -515,10 +515,10 @@ add_test(function() {
|
||||
open_details("addon7@tests.mozilla.org", "extension", function() {
|
||||
is(get("detail-name").textContent, "Test add-on 7", "Name should be correct");
|
||||
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable-btn"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -527,11 +527,11 @@ add_test(function() {
|
||||
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
|
||||
|
||||
// Enable it
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-enable"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-enable-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable-btn"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -542,10 +542,10 @@ add_test(function() {
|
||||
|
||||
// Reopen it
|
||||
open_details("addon7@tests.mozilla.org", "extension", function() {
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable-btn"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -555,11 +555,11 @@ add_test(function() {
|
||||
is(get("detail-pending").textContent, "Test add-on 7 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
|
||||
|
||||
// Undo enabling
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-undo"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-undo-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable-btn"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -577,10 +577,10 @@ add_test(function() {
|
||||
open_details("addon8@tests.mozilla.org", "extension", function() {
|
||||
is(get("detail-name").textContent, "Test add-on 8", "Name should be correct");
|
||||
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable-btn"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_visible(get("detail-warning"), "Warning message should be visible");
|
||||
is(get("detail-warning").textContent, "An important update is available for Test add-on 8.", "Warning message should be correct");
|
||||
@ -592,11 +592,11 @@ add_test(function() {
|
||||
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
|
||||
|
||||
// Disable it
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-disable"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-disable-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable-btn"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -607,10 +607,10 @@ add_test(function() {
|
||||
|
||||
// Reopen it
|
||||
open_details("addon8@tests.mozilla.org", "extension", function() {
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_visible(get("detail-enable-btn"), "Enable button should be visible");
|
||||
is_element_hidden(get("detail-disable-btn"), "Disable button should be hidden");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
|
||||
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
|
||||
@ -620,11 +620,11 @@ add_test(function() {
|
||||
is(get("detail-pending").textContent, "Test add-on 8 will be disabled after you restart " + gApp + ".", "Pending message should be correct");
|
||||
|
||||
// Undo disabling
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-undo"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
|
||||
EventUtils.synthesizeMouseAtCenter(get("detail-undo-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden");
|
||||
is_element_visible(get("detail-disable-btn"), "Disable button should be visible");
|
||||
is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible");
|
||||
|
||||
is_element_visible(get("detail-warning"), "Warning message should be visible");
|
||||
is(get("detail-warning").textContent, "An important update is available for Test add-on 8.", "Warning message should be correct");
|
||||
|
@ -105,7 +105,7 @@ function installSearchResult(aCallback) {
|
||||
ok(!!item, "Should see the search result in the list");
|
||||
|
||||
let status = get_node(item, "install-status");
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(status, "install-remote"), {}, gManagerWindow);
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(status, "install-remote-btn"), {}, gManagerWindow);
|
||||
|
||||
item.mInstall.addListener({
|
||||
onInstallEnded: function() {
|
||||
@ -146,7 +146,7 @@ function check_undo_install() {
|
||||
is_element_visible(get_node(item, "pending"), "Pending message should be visible");
|
||||
is(get_node(item, "pending").textContent, "Install Tests will be installed after you restart " + gApp + ".", "Pending message should be correct");
|
||||
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(item, "undo"), {}, gManagerWindow);
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(item, "undo-btn"), {}, gManagerWindow);
|
||||
|
||||
is(get_list_item_count(), 0, "Should be no items in the list");
|
||||
|
||||
@ -164,7 +164,7 @@ function check_undo_upgrade() {
|
||||
is_element_visible(get_node(item, "pending"), "Pending message should be visible");
|
||||
is(get_node(item, "pending").textContent, "Install Tests will be updated after you restart " + gApp + ".", "Pending message should be correct");
|
||||
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(item, "undo"), {}, gManagerWindow);
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(item, "undo-btn"), {}, gManagerWindow);
|
||||
|
||||
is(get_list_item_count(), 1, "Should be only one item in the list");
|
||||
|
||||
|
@ -371,7 +371,7 @@ add_test(function() {
|
||||
is(get_node(addon, "pending").textContent, "Test add-on will be disabled after you restart " + gApp + ".", "Pending message should be correct");
|
||||
|
||||
info("Undoing");
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo"), {}, gManagerWindow);
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
|
||||
is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
|
||||
@ -408,7 +408,7 @@ add_test(function() {
|
||||
is(get_node(addon, "pending").textContent, "Test add-on 2 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
|
||||
|
||||
info("Undoing");
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo"), {}, gManagerWindow);
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
|
||||
is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
|
||||
is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
|
||||
@ -438,7 +438,7 @@ add_test(function() {
|
||||
is(get_node(addon, "pending").textContent, "Test add-on 4 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
|
||||
|
||||
info("Undoing");
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo"), {}, gManagerWindow);
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
|
||||
is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible");
|
||||
is_element_hidden(get_node(addon, "disable-btn"), "Disable button should be hidden");
|
||||
@ -503,7 +503,7 @@ add_test(function() {
|
||||
is(get_node(addon, "pending").textContent, "Test add-on 7 will be disabled after you restart " + gApp + ".", "Pending message should be correct");
|
||||
|
||||
info("Undoing");
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo"), {}, gManagerWindow);
|
||||
EventUtils.synthesizeMouseAtCenter(get_node(addon, "undo-btn"), {}, gManagerWindow);
|
||||
is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden");
|
||||
is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden");
|
||||
is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible");
|
||||
|
@ -386,7 +386,7 @@ function get_install_item(aName) {
|
||||
function get_install_button(aItem) {
|
||||
isnot(aItem, null, "Item should not be null when checking state of install button");
|
||||
var installStatus = getAnonymousElementByAttribute(aItem, "anonid", "install-status");
|
||||
return getAnonymousElementByAttribute(installStatus, "anonid", "install-remote");
|
||||
return getAnonymousElementByAttribute(installStatus, "anonid", "install-remote-btn");
|
||||
}
|
||||
|
||||
|
||||
@ -454,7 +454,7 @@ add_test(function() {
|
||||
var originalHandler = sorters.handler;
|
||||
|
||||
var sorterNames = ["name", "dateUpdated"];
|
||||
var buttonIds = ["btn-name", "btn-date"];
|
||||
var buttonIds = ["name-btn", "date-btn"];
|
||||
var currentIndex = 0;
|
||||
var currentReversed = false;
|
||||
|
||||
|
@ -85,7 +85,7 @@ add_test(function() {
|
||||
// Tests that switching to date ordering works and defaults to descending
|
||||
add_test(function() {
|
||||
var sorters = gManagerWindow.document.getElementById("list-sorters");
|
||||
var nameSorter = gManagerWindow.document.getAnonymousElementByAttribute(sorters, "anonid", "btn-date");
|
||||
var nameSorter = gManagerWindow.document.getAnonymousElementByAttribute(sorters, "anonid", "date-btn");
|
||||
EventUtils.synthesizeMouseAtCenter(nameSorter, { }, gManagerWindow);
|
||||
|
||||
check_order([
|
||||
@ -102,7 +102,7 @@ add_test(function() {
|
||||
// Tests that switching to name ordering works and defaults to ascending
|
||||
add_test(function() {
|
||||
var sorters = gManagerWindow.document.getElementById("list-sorters");
|
||||
var nameSorter = gManagerWindow.document.getAnonymousElementByAttribute(sorters, "anonid", "btn-name");
|
||||
var nameSorter = gManagerWindow.document.getAnonymousElementByAttribute(sorters, "anonid", "name-btn");
|
||||
EventUtils.synthesizeMouseAtCenter(nameSorter, { }, gManagerWindow);
|
||||
|
||||
check_order([
|
||||
|
@ -453,7 +453,7 @@ add_test(function() {
|
||||
wait_for_view_load(gManagerWindow, function() {
|
||||
is(gDocument.getElementById("view-port").selectedPanel.id, "detail-view", "Should be in the detail view");
|
||||
|
||||
var button = gDocument.getElementById("detail-uninstall");
|
||||
var button = gDocument.getElementById("detail-uninstall-btn");
|
||||
isnot(button, null, "Should have a remove button");
|
||||
ok(!button.disabled, "Button should not be disabled");
|
||||
|
||||
@ -516,7 +516,7 @@ add_test(function() {
|
||||
wait_for_view_load(gManagerWindow, function() {
|
||||
is(gDocument.getElementById("view-port").selectedPanel.id, "detail-view", "Should be in the detail view");
|
||||
|
||||
var button = gDocument.getElementById("detail-uninstall");
|
||||
var button = gDocument.getElementById("detail-uninstall-btn");
|
||||
isnot(button, null, "Should have a remove button");
|
||||
ok(!button.disabled, "Button should not be disabled");
|
||||
|
||||
@ -582,7 +582,7 @@ add_test(function() {
|
||||
wait_for_view_load(gManagerWindow, function() {
|
||||
is(gDocument.getElementById("view-port").selectedPanel.id, "detail-view", "Should be in the detail view");
|
||||
|
||||
var button = gDocument.getElementById("detail-uninstall");
|
||||
var button = gDocument.getElementById("detail-uninstall-btn");
|
||||
isnot(button, null, "Should have a remove button");
|
||||
ok(!button.disabled, "Button should not be disabled");
|
||||
|
||||
|
@ -640,7 +640,7 @@
|
||||
color: grey;
|
||||
}
|
||||
|
||||
#detail-contrib-button {
|
||||
#detail-contrib-btn {
|
||||
color: #FFF;
|
||||
font-weight: bold;
|
||||
text-shadow: #4C9EF8 -1px -1px 1px;
|
||||
@ -649,7 +649,7 @@
|
||||
list-style-image: url("chrome://mozapps/skin/extensions/heart.png");
|
||||
}
|
||||
|
||||
#detail-contrib-button:hover {
|
||||
#detail-contrib-btn:hover {
|
||||
border-color: #4271FF;
|
||||
background-image: -moz-linear-gradient(#49CEFF, #4271FF);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user