commit f7e29112739cdc4baf560c4819823e47da0ae938
parent c37b21dccfd0747c519ce3f2fdd6a459f47020d8
Author: Dão Gottwald <dao@mozilla.com>
Date: Fri, 7 Nov 2025 11:08:10 +0000
Bug 1998685 - Update browser_ext_themes_highlight.js to work with the new search bar widget. r=mbeier,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D271589
Diffstat:
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
@@ -879,6 +879,8 @@ pref("browser.search.serpMetricsRecordedCounter", 0);
// days
pref("browser.search.widget.removeAfterDaysUnused", 120);
+pref("browser.search.widget.new", false);
+
// The number of times the search function in the URL bar has been used,
// capped at 100.
pref("browser.search.totalSearches", 0);
diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_highlight.js b/toolkit/components/extensions/test/browser/browser_ext_themes_highlight.js
@@ -32,7 +32,11 @@ add_task(async function test_support_selection() {
let fields = [
gURLBar.inputField,
- document.querySelector("#searchbar .searchbar-textbox"),
+ document.querySelector(
+ Services.prefs.getBoolPref("browser.search.widget.new")
+ ? "#search-container .urlbar-input"
+ : "#searchbar .searchbar-textbox"
+ ),
document.querySelector(".findbar-textbox"),
].filter(field => {
let bounds = field.getBoundingClientRect();