From b5e1be1d8de3690ea644dd7c9a36ca7b28c28a56 Mon Sep 17 00:00:00 2001 From: Greg Tatum Date: Tue, 26 May 2020 15:42:20 +0000 Subject: [PATCH] Bug 1634448 - Remove some unused references to the old profiler popup iframe; r=canaltinova These were left-over from the previous implementation. Differential Revision: https://phabricator.services.mozilla.com/D75849 --- .../themes/shared/toolbarbutton-icons.inc.css | 4 -- .../performance-new/test/browser/head.js | 47 ------------------- 2 files changed, 51 deletions(-) diff --git a/browser/themes/shared/toolbarbutton-icons.inc.css b/browser/themes/shared/toolbarbutton-icons.inc.css index 2c91fd956220..9f80d9f3b7cd 100644 --- a/browser/themes/shared/toolbarbutton-icons.inc.css +++ b/browser/themes/shared/toolbarbutton-icons.inc.css @@ -260,10 +260,6 @@ toolbar[brighttext] { list-style-image: url("chrome://devtools/skin/images/profiler-stopwatch.svg"); } -#PanelUI-profilerIframe { - width: 450px; -} - #preferences-button { list-style-image: url("chrome://global/skin/icons/settings.svg"); } diff --git a/devtools/client/performance-new/test/browser/head.js b/devtools/client/performance-new/test/browser/head.js index 489fa17a71ff..a874a75abec0 100644 --- a/devtools/client/performance-new/test/browser/head.js +++ b/devtools/client/performance-new/test/browser/head.js @@ -158,20 +158,6 @@ function maybeGetElementFromDocumentByText(document, text) { return getElementByXPath(document, xpath); } -/** - * Returns the popup's document. - * @returns {Document} - */ -function getIframeDocument() { - const iframe = document.getElementById("PanelUI-profilerIframe"); - if (!iframe) { - throw new Error( - "This function assumes the profiler iframe is already present." - ); - } - return iframe.contentDocument; -} - /** * Make sure the profiler popup is enabled. */ @@ -317,39 +303,6 @@ async function waitForTabTitle(title) { }); } -/** - * Close the popup, and wait for it to be destroyed. - */ -async function closePopup() { - const iframe = document.querySelector("#PanelUI-profilerIframe"); - - if (!iframe) { - throw new Error( - "Could not find the profiler iframe when attempting to close the popup. Was it " + - "already closed?" - ); - } - - const panel = iframe.closest("panel"); - if (!panel) { - throw new Error( - "Could not find the closest panel to the profiler's iframe." - ); - } - - info("Hide the profiler popup."); - panel.hidePopup(); - - info("Wait for the profiler popup to be completely hidden."); - while (true) { - if (!iframe.ownerDocument.contains(iframe)) { - info("The iframe was removed."); - return; - } - await tick(); - } -} - /** * Open about:profiling in a new tab, and output helpful log messages. *