refactor: remove DevTools legacy UI patching (#40331)

This commit is contained in:
Shelley Vohr 2023-10-26 14:36:04 -04:00 committed by GitHub
parent 30fbcfca7b
commit 652f995128
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 35 additions and 327 deletions

View file

@ -573,10 +573,11 @@ describe('chrome extensions', () => {
const showLastPanel = () => {
// this is executed in the devtools context, where UI is a global
const { UI } = (window as any);
const tabs = UI.InspectorView.instance().tabbedPane.tabs;
const { EUI } = (window as any);
const instance = EUI.InspectorView.InspectorView.instance();
const tabs = instance.tabbedPane.tabs;
const lastPanelId = tabs[tabs.length - 1].id;
UI.InspectorView.instance().showPanel(lastPanelId);
instance.showPanel(lastPanelId);
};
devToolsWebContents.executeJavaScript(`(${showLastPanel})()`, false).then(() => {
showPanelTimeoutId = setTimeout(show, 100);