commit | 705d89ff2c7589b7ab8c13b2e760e276520079f2 | [log] [tgz] |
---|---|---|
author | Wolfgang Beyer <[email protected]> | Fri Feb 24 15:12:34 2023 |
committer | Devtools-frontend LUCI CQ <devtools-frontend-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Feb 27 09:38:58 2023 |
tree | 7f20a233e54ef009fb1b1b1734cc040f7b63a031 | |
parent | ca76d9658dabeca3a296ce96efea6c8b3402c068 [diff] [blame] |
Fix links to headers tab in the network panel When the header overrides experiment is enabled, DevTools shows the new headers view in the network panel. This CL updates all links to the headers view to take the experiment status into account. Bug: 1288023 Change-Id: I33bc7464c048abef005e0c77b088cccee721d5df Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4291189 Commit-Queue: Wolfgang Beyer <[email protected]> Auto-Submit: Wolfgang Beyer <[email protected]> Reviewed-by: Danil Somsikov <[email protected]>
diff --git a/front_end/panels/application/components/FrameDetailsView.ts b/front_end/panels/application/components/FrameDetailsView.ts index 77bf98b..f4ed881 100644 --- a/front_end/panels/application/components/FrameDetailsView.ts +++ b/front_end/panels/application/components/FrameDetailsView.ts
@@ -450,8 +450,10 @@ const request = resource.request; return renderIconLink( 'network_panel_icon', i18nString(UIStrings.clickToRevealInNetworkPanel), (): Promise<void> => { - const requestLocation = NetworkForward.UIRequestLocation.UIRequestLocation.tab( - request, NetworkForward.UIRequestLocation.UIRequestTabs.Headers); + const headersTab = Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.HEADER_OVERRIDES) ? + NetworkForward.UIRequestLocation.UIRequestTabs.HeadersComponent : + NetworkForward.UIRequestLocation.UIRequestTabs.Headers; + const requestLocation = NetworkForward.UIRequestLocation.UIRequestLocation.tab(request, headersTab); return Common.Revealer.reveal(requestLocation); }); }