diff --git a/browser/components/extensions/test/browser/browser.ini b/browser/components/extensions/test/browser/browser.ini index 76a8a846b568..760fd60c9b8d 100644 --- a/browser/components/extensions/test/browser/browser.ini +++ b/browser/components/extensions/test/browser/browser.ini @@ -175,7 +175,6 @@ skip-if = (verify && debug && (os == 'mac')) [browser_ext_popup_corners.js] [browser_ext_popup_focus.js] disabled = bug 1438663 -[browser_ext_popup_requestPermission.js] [browser_ext_popup_select.js] skip-if = debug || os != 'win' # FIXME: re-enable on debug build (bug 1442822) [browser_ext_popup_sendMessage.js] diff --git a/browser/components/extensions/test/browser/browser_ext_popup_requestPermission.js b/browser/components/extensions/test/browser/browser_ext_popup_requestPermission.js deleted file mode 100644 index 1cd20a932814..000000000000 --- a/browser/components/extensions/test/browser/browser_ext_popup_requestPermission.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; - -add_task(async function test_popup_requestPermission_resolve() { - let extension = ExtensionTestUtils.loadExtension({ - manifest: { - browser_action: { - default_popup: "popup.html", - }, - optional_permissions: [""], - }, - - files: { - "popup.html": ``, - "popup.js": async () => { - const success = await new Promise(resolve => { - browser.test.withHandlingUserInput(() => { - resolve( - browser.permissions.request({ - origins: [""], - }) - ); - }); - }); - browser.test.assertTrue( - success, - "browser.permissions.request promise resolves" - ); - browser.test.sendMessage("done"); - }, - }, - }); - - const requestPrompt = promisePopupNotificationShown( - "addon-webext-permissions" - ).then(panel => { - panel.button.click(); - }); - await extension.startup(); - await clickBrowserAction(extension); - await requestPrompt; - await extension.awaitMessage("done"); - await extension.unload(); -}); diff --git a/browser/modules/ExtensionsUI.jsm b/browser/modules/ExtensionsUI.jsm index d6448a47241e..e0289cfadf2e 100644 --- a/browser/modules/ExtensionsUI.jsm +++ b/browser/modules/ExtensionsUI.jsm @@ -41,9 +41,6 @@ function getTabBrowser(browser) { while (browser.ownerGlobal.docShell.itemType !== Ci.nsIDocShell.typeChrome) { browser = browser.ownerGlobal.docShell.chromeEventHandler; } - if (browser.getAttribute("webextension-view-type") == "popup") { - browser = browser.ownerGlobal.gBrowser.selectedBrowser; - } return { browser, window: browser.ownerGlobal }; }