Files
Nicolas Chevobbe 9654aa263e Bug 2048544 - [devtools] Use moz-page-nav in about:debugging. r=devtools-reviewers,fluent-reviewers,desktop-theme-reviewers,jdescottes,flod,tgiles.
The "main" navigation items (setup, this firefox and the link to documentation)
are migrated to `<moz-page-nav-button>`.
In order to properly navigate, we need to listen for the custom event sent by
those button to change the view, and use the `history` prop that we get from
wrapping `Sidebar` in a `withRouter` call.

This patch removes the `SidebarFixedItem` component that is no longer used.

Note that the usb/remote runtimes items are not migrated to `<moz-page-nav-button>`
yet as that requires more involved UI changes (that should be done as part of Bug 2050746)

Differential Revision: https://phabricator.services.mozilla.com/D308962
2026-07-09 14:47:54 +00:00

51 lines
1.7 KiB
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
/* import-globals-from helper-collapsibilities.js */
Services.scriptloader.loadSubScript(
CHROME_URL_ROOT + "helper-collapsibilities.js",
this
);
/**
* Check that DevTools are not closed when leaving This Firefox runtime page.
*/
add_task(async function () {
info("Force all debug target panes to be expanded");
prepareCollapsibilitiesTest();
const { document, tab, window } = await openAboutDebugging();
await selectThisFirefoxPage(document, window.AboutDebugging.store);
const setupSidebarItem = findSidebarItemByText("Setup", document);
ok(setupSidebarItem, "Found the Setup sidebar item");
info("Open devtools on the current about:debugging tab");
const toolbox = await openToolboxForTab(tab, "inspector");
const inspector = toolbox.getPanel("inspector");
info("DevTools starts workers, wait for requests to settle");
const store = window.AboutDebugging.store;
await waitForAboutDebuggingRequests(store);
info("Click on the Setup item in the sidebar");
selectSidebarItemPage("Setup", document);
await waitForDispatch(store, "UNWATCH_RUNTIME_SUCCESS");
info("Wait until Connect page is displayed");
await waitUntil(() => document.querySelector(".qa-connect-page"));
const markupViewElement = inspector.panelDoc.getElementById("markup-box");
ok(markupViewElement, "Inspector is still rendered");
// We explicitely destroy the toolbox in order to ensure waiting for its full destruction
// and avoid leak / pending requests
info("Destroy the opened toolbox");
await toolbox.destroy();
await removeTab(tab);
});