From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- .../content/test/webextensions/browser_aboutaddons_blanktab.js | 2 +- .../test/webextensions/browser_extension_sideloading.js | 10 +++++++--- .../test/webextensions/browser_permissions_local_file.js | 4 +++- .../test/webextensions/browser_update_interactive_noprompt.js | 2 +- browser/base/content/test/webextensions/head.js | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) (limited to 'browser/base/content/test/webextensions') diff --git a/browser/base/content/test/webextensions/browser_aboutaddons_blanktab.js b/browser/base/content/test/webextensions/browser_aboutaddons_blanktab.js index 228fe71815..1e0814ea96 100644 --- a/browser/base/content/test/webextensions/browser_aboutaddons_blanktab.js +++ b/browser/base/content/test/webextensions/browser_aboutaddons_blanktab.js @@ -8,7 +8,7 @@ add_task(async function testBlankTabReusedAboutAddons() { is(browser, gBrowser.selectedBrowser, "New tab is selected"); // Opening about:addons shouldn't change the selected tab. - BrowserOpenAddonsMgr(); + BrowserAddonUI.openAddonsMgr(); is(browser, gBrowser.selectedBrowser, "No new tab was opened"); diff --git a/browser/base/content/test/webextensions/browser_extension_sideloading.js b/browser/base/content/test/webextensions/browser_extension_sideloading.js index 4e1fe07194..5d8f82a178 100644 --- a/browser/base/content/test/webextensions/browser_extension_sideloading.js +++ b/browser/base/content/test/webextensions/browser_extension_sideloading.js @@ -16,11 +16,14 @@ const kSideloaded = true; async function createWebExtension(details) { let options = { manifest: { + manifest_version: details.manifest_version ?? 2, + browser_specific_settings: { gecko: { id: details.id } }, name: details.name, permissions: details.permissions, + host_permissions: details.host_permissions, }, }; @@ -86,9 +89,10 @@ add_task(async function test_sideloading() { const ID2 = "addon2@tests.mozilla.org"; await createWebExtension({ + manifest_version: 3, id: ID2, name: "Test 2", - permissions: [""], + host_permissions: [""], }); const ID3 = "addon3@tests.mozilla.org"; @@ -224,7 +228,7 @@ add_task(async function test_sideloading() { // Close the hamburger menu and go directly to the addons manager await gCUITestUtils.hideMainMenu(); - win = await BrowserOpenAddonsMgr(VIEW); + win = await BrowserAddonUI.openAddonsMgr(VIEW); await waitAboutAddonsViewLoaded(win.document); // about:addons addon entry element. @@ -293,7 +297,7 @@ add_task(async function test_sideloading() { // Close the hamburger menu and go to the detail page for this addon await gCUITestUtils.hideMainMenu(); - win = await BrowserOpenAddonsMgr( + win = await BrowserAddonUI.openAddonsMgr( `addons://detail/${encodeURIComponent(ID3)}` ); diff --git a/browser/base/content/test/webextensions/browser_permissions_local_file.js b/browser/base/content/test/webextensions/browser_permissions_local_file.js index 22dff8cb38..731e8adea7 100644 --- a/browser/base/content/test/webextensions/browser_permissions_local_file.js +++ b/browser/base/content/test/webextensions/browser_permissions_local_file.js @@ -14,7 +14,9 @@ async function installFile(filename) { MockFilePicker.setFiles([file]); MockFilePicker.afterOpenCallback = MockFilePicker.cleanup; - let { document } = await BrowserOpenAddonsMgr("addons://list/extension"); + let { document } = await BrowserAddonUI.openAddonsMgr( + "addons://list/extension" + ); // Do the install... await waitAboutAddonsViewLoaded(document); diff --git a/browser/base/content/test/webextensions/browser_update_interactive_noprompt.js b/browser/base/content/test/webextensions/browser_update_interactive_noprompt.js index 0b0b912503..9ad3deaae1 100644 --- a/browser/base/content/test/webextensions/browser_update_interactive_noprompt.js +++ b/browser/base/content/test/webextensions/browser_update_interactive_noprompt.js @@ -36,7 +36,7 @@ async function testUpdateNoPrompt( is(addon.version, initialVersion, "Version 1 of the addon is installed"); // Go to Extensions in about:addons - let win = await BrowserOpenAddonsMgr("addons://list/extension"); + let win = await BrowserAddonUI.openAddonsMgr("addons://list/extension"); await waitAboutAddonsViewLoaded(win.document); diff --git a/browser/base/content/test/webextensions/head.js b/browser/base/content/test/webextensions/head.js index f1183c61b8..f364dbed88 100644 --- a/browser/base/content/test/webextensions/head.js +++ b/browser/base/content/test/webextensions/head.js @@ -508,7 +508,7 @@ async function interactiveUpdateTest(autoUpdate, checkFn) { ok(addon, "Addon was installed"); is(addon.version, "1.0", "Version 1 of the addon is installed"); - let win = await BrowserOpenAddonsMgr("addons://list/extension"); + let win = await BrowserAddonUI.openAddonsMgr("addons://list/extension"); await waitAboutAddonsViewLoaded(win.document); -- cgit v1.2.3