Backed out changeset e650be9ceb1f (bug 1894222) for causing bc failures on browser_customize_sidebar.js CLOSED TREE

This commit is contained in:
Norisz Fay 2024-06-06 06:27:05 +03:00
parent 8829ad313f
commit 59d854a90e
4 changed files with 0 additions and 63 deletions

View File

@ -66,15 +66,3 @@
font-size: 0.9em;
}
}
#manage-settings {
display: flex;
align-items: center;
gap: var(--space-medium);
margin-block-start: var(--space-xxlarge);
font-size: 0.9em;
.icon {
background-image: url("chrome://browser/skin/preferences/category-general.svg");
}
}

View File

@ -75,13 +75,6 @@ export class SidebarCustomize extends SidebarPage {
return l10nMap.get(view);
}
openFirefoxSettings(e) {
e.preventDefault();
if (e.type == "keydown" && e.code == "Enter") {
this.getWindow().openPreferences();
}
}
inputTemplate(tool) {
return html`<div class="input-wrapper">
<input
@ -188,16 +181,6 @@ export class SidebarCustomize extends SidebarPage {
</div>
</div>`
)}
<div id="manage-settings">
<span class="icon ghost-icon" role="presentation"></span>
<a
href="about:preferences"
@click=${this.openFirefoxSettings}
@keydown=${this.openFirefoxSettings}
data-l10n-id="sidebar-customize-firefox-settings"
>
</a>
</div>
</div>
`;
}

View File

@ -26,7 +26,6 @@ sidebar-search-results-header =
.heading = Search results for “{ $query }”
sidebar-customize-firefox-tools = { -brand-product-name } tools
sidebar-customize-firefox-settings = Manage { -brand-short-name } settings
## Labels for sidebar context menu items

View File

@ -110,36 +110,3 @@ add_task(async function test_customize_not_added_in_menubar() {
await BrowserTestUtils.closeWindow(win);
});
add_task(async function test_manage_preferences_navigation() {
const win = await BrowserTestUtils.openNewBrowserWindow();
const { document, SidebarController } = win;
const { contentWindow } = SidebarController.browser;
const sidebar = document.querySelector("sidebar-main");
ok(sidebar, "Sidebar is shown.");
const button = sidebar.customizeButton;
const promiseFocused = BrowserTestUtils.waitForEvent(win, "SidebarFocused");
button.click();
await promiseFocused;
let customizeDocument = win.SidebarController.browser.contentDocument;
const customizeComponent =
customizeDocument.querySelector("sidebar-customize");
let manageSettings =
customizeComponent.shadowRoot.getElementById("manage-settings");
EventUtils.synthesizeMouseAtCenter(manageSettings, {}, contentWindow);
await BrowserTestUtils.waitForCondition(
() =>
win.gBrowser.selectedTab.linkedBrowser.currentURI.spec ==
"about:preferences",
"Navigated to about:preferences tab"
);
is(
win.gBrowser.selectedTab.linkedBrowser.currentURI.spec,
"about:preferences",
"Manage Settings link navigates to about:preferences."
);
await BrowserTestUtils.closeWindow(win);
});