Backed out changeset 6e3058771f18 (bug 1434706) for bc6 and X failures in browser/base/content/test/general/browser_contextmenu_input.js and services/fxaccounts/tests/xpcshell/test_accounts.js respectively on a CLOSED TREE

This commit is contained in:
shindli
2018-02-23 10:25:56 +02:00
parent 6723cb630c
commit 4f93afdfba
17 changed files with 303 additions and 380 deletions

View File

@@ -95,8 +95,6 @@ var gSync = {
});
XPCOMUtils.defineLazyPreferenceGetter(this, "PRODUCT_INFO_BASE_URL",
"app.productInfo.baseURL");
XPCOMUtils.defineLazyPreferenceGetter(this, "SYNC_ENABLED",
"identity.fxaccounts.enabled");
},
_maybeUpdateUIState() {
@@ -116,11 +114,6 @@ var gSync = {
return;
}
if (!this.SYNC_ENABLED) {
this.onSyncDisabled();
return;
}
// initial label for the sync buttons.
let statusBroadcaster = document.getElementById("sync-status");
if (!statusBroadcaster) {
@@ -477,10 +470,6 @@ var gSync = {
// "Send Tab to Device" menu item
updateTabContextMenu(aPopupMenu, aTargetTab) {
if (!this.SYNC_ENABLED) {
// These items are hidden in onSyncDisabled(). No need to do anything.
return;
}
const enabled = !this.syncConfiguredAndLoading &&
this.isSendableURI(aTargetTab.linkedBrowser.currentURI.spec);
@@ -489,10 +478,6 @@ var gSync = {
// "Send Page to Device" and "Send Link to Device" menu items
updateContentContextMenu(contextMenu) {
if (!this.SYNC_ENABLED) {
// These items are hidden by default. No need to do anything.
return;
}
// showSendLink and showSendPage are mutually exclusive
const showSendLink = contextMenu.onSaveableLink || contextMenu.onPlainTextLink;
const showSendPage = !showSendLink
@@ -666,13 +651,6 @@ var gSync = {
}
},
onSyncDisabled() {
const toHide = [...document.querySelectorAll(".sync-ui-item")];
for (const item of toHide) {
item.hidden = true;
}
},
QueryInterface: XPCOMUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference