commit 41d9f4f9768ccd7bc2ac2de9da6f3e499c5c6640 parent ffbd20a25b8459060bf3a1e8a76532e7732f169f Author: Rizwan Syed <rizwansyed876@gmail.com> Date: Thu, 20 Nov 2025 13:45:57 +0000 Bug 1854614 -"reload" button in the netmonitor panel seems to have no effect on WebExtension targets. r=bomsy,devtools-reviewers Differential Revision: https://phabricator.services.mozilla.com/D270970 Diffstat:
3 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_addons_debug_netmonitor.js b/devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_addons_debug_netmonitor.js @@ -46,6 +46,25 @@ add_task(async function testWebExtensionsToolboxNetmonitor() { const monitor = await toolbox.selectTool("netmonitor"); const { document: monitorDocument, store } = monitor.panelWin; + await waitUntil( + () => !!monitorDocument.querySelector(".request-list-empty-notice") + ); + + const emptyListNotice = monitorDocument.querySelector( + ".request-list-empty-notice" + ); + + ok( + !!emptyListNotice, + "An empty notice should be displayed when the frontend is opened." + ); + + is( + emptyListNotice.innerText, + "Perform a request to see detailed information about network activity.", + "The reload and perfomance analysis details should not be visible in the netmonitor" + ); + const expectedURL = "https://example.org/?test_netmonitor=1"; await toolbox.commands.scriptCommand.execute(`fetch("${expectedURL}");`); diff --git a/devtools/client/netmonitor/src/components/StatusBar.js b/devtools/client/netmonitor/src/components/StatusBar.js @@ -65,11 +65,12 @@ class StatusBar extends Component { const { openStatistics, summary, timingMarkers, connector } = this.props; const { count, contentSize, transferredSize, ms } = summary; const { DOMContentLoaded, load } = timingMarkers; - const { isBrowserToolbox } = connector.getToolbox(); + const toolbox = connector.getToolbox(); return div( { className: "devtools-toolbar devtools-toolbar-bottom" }, - !isBrowserToolbox + !toolbox.isBrowserToolbox && + !toolbox.commands.descriptorFront.isWebExtensionDescriptor ? Localized( { id: "network-menu-summary-tooltip-perf", diff --git a/devtools/client/netmonitor/src/components/request-list/RequestListEmptyNotice.js b/devtools/client/netmonitor/src/components/request-list/RequestListEmptyNotice.js @@ -61,7 +61,8 @@ class RequestListEmptyNotice extends Component { { className: "request-list-empty-notice", }, - !toolbox.isBrowserToolbox + !toolbox.isBrowserToolbox && + !toolbox.commands.descriptorFront.isWebExtensionDescriptor ? div( { className: "notice-reload-message empty-notice-element" }, span(null, RELOAD_NOTICE_1), @@ -79,7 +80,8 @@ class RequestListEmptyNotice extends Component { { className: "notice-reload-message empty-notice-element" }, span(null, RELOAD_NOTICE_BT) ), - !toolbox.isBrowserToolbox + !toolbox.isBrowserToolbox && + !toolbox.commands.descriptorFront.isWebExtensionDescriptor ? div( { className: "notice-perf-message empty-notice-element" }, span(null, PERFORMANCE_NOTICE_1),