commit d7a2f1715245475634d15125095cc94e5f0fffa4
parent 0f1dde9516698dad14e761f300c4f01f5330c07f
Author: Nikki Sharpley <nsharpley@mozilla.com>
Date: Tue, 14 Oct 2025 14:22:06 +0000
Bug 1983326 - Green up the browser/components/customizableui tests when enabling sidebar.revamp by default r=kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D268136
Diffstat:
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/browser/components/customizableui/test/browser_1161838_inserted_new_default_buttons.js b/browser/components/customizableui/test/browser_1161838_inserted_new_default_buttons.js
@@ -26,8 +26,15 @@ function test() {
CustomizableUIInternal.loadSavedState();
CustomizableUIInternal.updateForNewVersion();
- is(gFuturePlacements.size, 0, "No change to future placements initially.");
-
+ // New version will include sidebar button if sidebar.revamp is true
+ let includesSidebarButton =
+ Services.prefs.getBoolPref("sidebar.revamp", false) &&
+ gFuturePlacements.get("nav-bar")?.has("sidebar-button");
+ is(
+ gFuturePlacements.size,
+ includesSidebarButton ? 1 : 0,
+ "No unexpected future placements initially."
+ );
// Add our widget to the defaults:
let testWidgetNew = {
id: "test-messing-with-default-placements-new-pref",