mirror of
https://codeberg.org/librewolf/source.git
synced 2024-12-22 21:53:31 -05:00
fix unified-extensions-dont-show-recommendations.patch
the test seems broken, but we dont need it anyways :)
This commit is contained in:
parent
73d1dfe303
commit
46dc40d682
1 changed files with 0 additions and 68 deletions
|
@ -23,71 +23,3 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
let panel = this.panel;
|
let panel = this.panel;
|
||||||
--- a/browser/components/extensions/test/browser/browser_unified_extensions.js
|
|
||||||
+++ b/browser/components/extensions/test/browser/browser_unified_extensions.js
|
|
||||||
@@ -485,10 +485,64 @@
|
|
||||||
|
|
||||||
gUnifiedExtensions.getActivePolicies = origGetActivePolicies;
|
|
||||||
});
|
|
||||||
|
|
||||||
add_task(
|
|
||||||
+ async function test_button_opens_extlist_when_no_extension_and_pane_disabled() {
|
|
||||||
+ // If extensions.getAddons.showPane is set to false, there is no "Recommended" tab,
|
|
||||||
+ // so we need to make sure we don't navigate to it.
|
|
||||||
+
|
|
||||||
+ // The test harness registers regular extensions so we need to mock the
|
|
||||||
+ // `getActivePolicies` extension to simulate zero extensions installed.
|
|
||||||
+ const origGetActivePolicies = gUnifiedExtensions.getActivePolicies;
|
|
||||||
+ gUnifiedExtensions.getActivePolicies = () => [];
|
|
||||||
+
|
|
||||||
+ await SpecialPowers.pushPrefEnv({
|
|
||||||
+ set: [
|
|
||||||
+ // Set this to another value to make sure not to "accidentally" land on the right page
|
|
||||||
+ ["extensions.ui.lastCategory", "addons://list/theme"],
|
|
||||||
+ ["extensions.getAddons.showPane", false],
|
|
||||||
+ ],
|
|
||||||
+ });
|
|
||||||
+
|
|
||||||
+ await BrowserTestUtils.withNewTab(
|
|
||||||
+ { gBrowser, url: "about:robots" },
|
|
||||||
+ async () => {
|
|
||||||
+ const { button } = gUnifiedExtensions;
|
|
||||||
+ ok(button, "expected button");
|
|
||||||
+
|
|
||||||
+ // Primary click should open about:addons.
|
|
||||||
+ const tabPromise = BrowserTestUtils.waitForNewTab(
|
|
||||||
+ gBrowser,
|
|
||||||
+ "about:addons",
|
|
||||||
+ true
|
|
||||||
+ );
|
|
||||||
+
|
|
||||||
+ button.click();
|
|
||||||
+
|
|
||||||
+ const tab = await tabPromise;
|
|
||||||
+ is(
|
|
||||||
+ gBrowser.currentURI.spec,
|
|
||||||
+ "about:addons",
|
|
||||||
+ "expected about:addons to be open"
|
|
||||||
+ );
|
|
||||||
+ is(
|
|
||||||
+ gBrowser.selectedBrowser.contentWindow.gViewController.currentViewId,
|
|
||||||
+ "addons://list/extension",
|
|
||||||
+ "expected about:addons to show the extension list"
|
|
||||||
+ );
|
|
||||||
+ BrowserTestUtils.removeTab(tab);
|
|
||||||
+ }
|
|
||||||
+ );
|
|
||||||
+
|
|
||||||
+ await SpecialPowers.popPrefEnv();
|
|
||||||
+
|
|
||||||
+ gUnifiedExtensions.getActivePolicies = origGetActivePolicies;
|
|
||||||
+ }
|
|
||||||
+);
|
|
||||||
+
|
|
||||||
+add_task(
|
|
||||||
async function test_unified_extensions_panel_not_open_in_customization_mode() {
|
|
||||||
const listView = getListView();
|
|
||||||
ok(listView, "expected list view");
|
|
||||||
const throwIfExecuted = () => {
|
|
||||||
throw new Error("panel should not have been shown");
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue