Backed out changeset 4ef6f0f9300d (bug 1923212) for causing bc failures on browser_searchModeSwitcher_basic.js CLOSED TREE

This commit is contained in:
Norisz Fay 2024-10-18 20:41:04 +03:00
parent 124d93f80d
commit d0b8be820a
68 changed files with 33 additions and 204 deletions

View File

@ -84,10 +84,6 @@ class TipTestProvider extends UrlbarProvider {
// Check that the URL bar manages accessibility focus appropriately.
async function runTests() {
// TODO: Remove in https://bugzilla.mozilla.org/show_bug.cgi?id=1923383
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
registerCleanupFunction(async function () {
await UrlbarTestUtils.promisePopupClose(window);
await PlacesUtils.history.clear();

View File

@ -9,10 +9,7 @@ function focus_in_navbar() {
return parent != null;
}
const SCOTCH_BONNET_PREF = "browser.urlbar.scotchBonnet.enableOverride";
function test() {
Services.prefs.setBoolPref(SCOTCH_BONNET_PREF, false);
// Put the home button in the pre-proton placement to test focus states.
CustomizableUI.addWidgetToArea(
"home-button",
@ -20,7 +17,6 @@ function test() {
CustomizableUI.getPlacementOfWidget("stop-reload-button").position + 1
);
registerCleanupFunction(async function resetToolbar() {
Services.prefs.clearUserPref(SCOTCH_BONNET_PREF);
await CustomizableUI.reset();
});

View File

@ -120,8 +120,6 @@ const BOOKMARKS_COUNT = 100;
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [
// TODO: Reenable in https://bugzilla.mozilla.org/show_bug.cgi?id=1923388
["browser.urlbar.scotchBonnet.enableOverride", false],
["browser.toolbars.keyboard_navigation", true],
["accessibility.tabfocus", 7],
],

View File

@ -22,8 +22,6 @@ prefs = [
"extensions.screenshots.disabled=false",
# Need to keep the revamped sidebar off until Bug 1905212 is done
"sidebar.revamp=false",
# TODO: Renable in Bug 1923381
"browser.urlbar.scotchBonnet.enableOverride=false",
]
support-files = ["head.js"]

View File

@ -2,19 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const SCOTCH_BONNET_PREF = "browser.urlbar.scotchBonnet.enableOverride";
function test() {
waitForExplicitFinish();
Services.prefs.setBoolPref(SCOTCH_BONNET_PREF, false);
ok(PopupNotifications, "PopupNotifications object exists");
ok(PopupNotifications.panel, "PopupNotifications panel exists");
setup();
registerCleanupFunction(() => {
Services.prefs.clearUserPref(SCOTCH_BONNET_PREF);
});
}
const FALLBACK_ANCHOR = gURLBar.searchButton

View File

@ -17,9 +17,6 @@ registerCleanupFunction(async function resetToolbar() {
});
add_task(async function setupHomeButton() {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
// Put the home button in the pre-proton placement to test focus states.
CustomizableUI.addWidgetToArea(
"home-button",

View File

@ -82,9 +82,6 @@ var tests = [
];
add_task(async function test() {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
ok(gIdentityHandler, "gIdentityHandler should exist");
await BrowserTestUtils.openNewForegroundTab(gBrowser);

View File

@ -14,13 +14,11 @@ ChromeUtils.defineESModuleGetters(this, {
});
let gTree;
const isRestrictKeywordsFeatureOn = () =>
UrlbarPrefs.getScotchBonnetPref("searchRestrictKeywords.featureGate");
const isRestrictKeywordsFeatureOn = UrlbarPrefs.getScotchBonnetPref(
"searchRestrictKeywords.featureGate"
);
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
let prefs = await openPreferencesViaOpenPreferencesAPI("search", {
leaveOpen: true,
});
@ -167,10 +165,10 @@ add_task(async function keywordNotEditable_enterKey() {
let keyword = tokenToKeyword.get(shortcut.restrict).toLowerCase();
Assert.equal(
gTree.view.getCellText(row, col),
isRestrictKeywordsFeatureOn()
isRestrictKeywordsFeatureOn
? `@${keyword}, ${shortcut.restrict}`
: shortcut.restrict,
isRestrictKeywordsFeatureOn()
isRestrictKeywordsFeatureOn
? "Sanity check: Keyword column has correct restriction keyword and char initially"
: "Sanity check: Keyword column has correct restriction char initially"
);
@ -186,10 +184,10 @@ add_task(async function keywordNotEditable_enterKey() {
Assert.equal(
gTree.view.getCellText(row, col),
isRestrictKeywordsFeatureOn()
isRestrictKeywordsFeatureOn
? `@${keyword}, ${shortcut.restrict}`
: shortcut.restrict,
isRestrictKeywordsFeatureOn()
isRestrictKeywordsFeatureOn
? "Keyword column is still restriction keyword and char"
: "Keyword column is still restriction char"
);
@ -209,10 +207,10 @@ add_task(async function keywordNotEditable_click() {
);
Assert.equal(
gTree.view.getCellText(row, col),
isRestrictKeywordsFeatureOn()
isRestrictKeywordsFeatureOn
? `@${keyword}, ${shortcut.restrict}`
: shortcut.restrict,
isRestrictKeywordsFeatureOn()
isRestrictKeywordsFeatureOn
? "Sanity check: Keyword column has correct restriction keyword and char initially"
: "Sanity check: Keyword column has correct restriction char initially"
);
@ -252,10 +250,10 @@ add_task(async function keywordNotEditable_click() {
Assert.equal(
gTree.view.getCellText(row, col),
isRestrictKeywordsFeatureOn()
isRestrictKeywordsFeatureOn
? `@${keyword}, ${shortcut.restrict}`
: shortcut.restrict,
isRestrictKeywordsFeatureOn()
isRestrictKeywordsFeatureOn
? "Keyword column is still restriction keyword and char"
: "Keyword column is still restriction char"
);

View File

@ -8,10 +8,6 @@ const { SearchUtils } = ChromeUtils.importESModule(
"resource://gre/modules/SearchUtils.sys.mjs"
);
add_task(async function test_restore_functionality() {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
// Ensure no engines are hidden to begin with.
for (let engine of await Services.search.getAppProvidedEngines()) {
if (engine.hidden) {

View File

@ -10,10 +10,7 @@ add_task(async function test_label_and_icon() {
// Make sure that tabs are restored on demand as otherwise the tab will start
// loading immediately and we can't check its icon and label.
await SpecialPowers.pushPrefEnv({
set: [
["browser.sessionstore.restore_on_demand", true],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
set: [["browser.sessionstore.restore_on_demand", true]],
});
// Create a new tab.

View File

@ -18,9 +18,6 @@ ChromeUtils.defineLazyGetter(this, "UrlbarTestUtils", () => {
});
add_task(async function test() {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
// Open the urlbar view and enter search mode.
await UrlbarTestUtils.promiseAutocompleteResultPopup({
window,

View File

@ -48,7 +48,6 @@ add_setup(async function () {
// Set following prefs so tips are actually shown.
["browser.laterrun.bookkeeping.profileCreationTime", 0],
["browser.laterrun.bookkeeping.updateAppliedTime", 0],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
});

View File

@ -8,12 +8,6 @@
const HELP_URL = "about:mozilla";
const TIP_URL = "about:about";
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
});
add_task(async function tipIsSecondResult() {
let results = [
new UrlbarResult(

View File

@ -40,9 +40,6 @@ async function testVal(urlFormatString, clobberedURLString = null) {
}
add_task(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
const PREF_FORMATTING = "browser.urlbar.formatting.enabled";
const PREF_TRIM_HTTPS = "browser.urlbar.trimHttps";

View File

@ -36,7 +36,6 @@ add_task(async function test_strikeout_on_no_https_trimming() {
await SpecialPowers.pushPrefEnv({
set: [
["browser.urlbar.trimHttps", false],
["browser.urlbar.scotchBonnet.enableOverride", false],
["security.insecure_connection_text.enabled", false],
["security.mixed_content.block_active_content", false],
],

View File

@ -9,10 +9,7 @@ const SEARCH_STRING = "chocolate cake";
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [
["browser.urlbar.showSearchTerms.featureGate", true],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
set: [["browser.urlbar.showSearchTerms.featureGate", true]],
});
let cleanup = await installPersistTestEngines();
registerCleanupFunction(async function () {

View File

@ -45,7 +45,6 @@ function testValues(trimmedProtocol, notTrimmedProtocol) {
add_task(async function () {
const PREF_TRIM_URLS = "browser.urlbar.trimURLs";
const PREF_TRIM_HTTPS = "browser.urlbar.trimHttps";
const PREF_SCOTCHBONNET = "browser.urlbar.scotchBonnet.enableOverride";
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser);
@ -53,12 +52,10 @@ add_task(async function () {
BrowserTestUtils.removeTab(tab);
Services.prefs.clearUserPref(PREF_TRIM_URLS);
Services.prefs.clearUserPref(PREF_TRIM_HTTPS);
Services.prefs.clearUserPref(PREF_SCOTCHBONNET);
gURLBar.setURI();
});
Services.prefs.setBoolPref(PREF_TRIM_HTTPS, false);
Services.prefs.setBoolPref(PREF_SCOTCHBONNET, false);
// Avoid search service sync init warnings due to URIFixup, when running the
// test alone.

View File

@ -16,10 +16,7 @@
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
// The example.com engine can interfere with this test.
set: [
["browser.urlbar.suggest.engines", false],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
set: [["browser.urlbar.suggest.engines", false]],
});
await cleanUp();
});

View File

@ -79,10 +79,6 @@ function forceGC() {
}
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
await initAccessibilityService();
});

View File

@ -47,9 +47,6 @@ function assertSelected_one_off(index) {
}
add_task(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
let maxResults = Services.prefs.getIntPref("browser.urlbar.maxRichResults");
let tab = await BrowserTestUtils.openNewForegroundTab(
gBrowser,

View File

@ -9,9 +9,6 @@
*/
add_task(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
registerCleanupFunction(async function () {
await PlacesUtils.bookmarks.eraseEverything();
});

View File

@ -16,7 +16,6 @@ add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [
["browser.urlbar.clipboard.featureGate", true],
["browser.urlbar.scotchBonnet.enableOverride", false],
["browser.urlbar.suggest.clipboard", true],
],
});

View File

@ -25,7 +25,6 @@ async function test_copy_values(testValues, trimHttps) {
await SpecialPowers.pushPrefEnv({
set: [
["browser.urlbar.scotchBonnet.enableOverride", false],
["browser.urlbar.trimURLs", true],
["browser.urlbar.trimHttps", trimHttps],
// avoid prompting about phishing

View File

@ -9,9 +9,6 @@ const ORIGINAL_CHUNK_RESULTS_DELAY =
UrlbarProvidersManager.CHUNK_RESULTS_DELAY_MS;
add_setup(async function setup() {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
let suggestionsEngine = await SearchTestUtils.installOpenSearchEngine({
url: getRootDirectory(gTestPath) + "searchSuggestionEngine.xml",
});

View File

@ -9,9 +9,6 @@
// When the heuristic result is not the first result added, it should still be
// selected.
add_task(async function slowHeuristicSelected() {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
// First, add a provider that adds a heuristic result on a delay. Both this
// provider and the one below have a high priority so that only they are used
// during the test.

View File

@ -81,7 +81,6 @@ add_setup(async function () {
set: [
// We don't want autofill to influence this test.
["browser.urlbar.autoFill", false],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
});
registerCleanupFunction(async () => {

View File

@ -18,12 +18,6 @@ ChromeUtils.defineLazyGetter(this, "oneOffSearchButtons", () => {
let originalEngine;
let newEngine;
add_setup(async () => {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
});
// The one-off context menu should not be shown.
add_task(async function contextMenu_not_shown() {
// Add a popupshown listener on the context menu that sets this

View File

@ -279,12 +279,6 @@ add_setup(async function () {
);
});
add_setup(async () => {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
});
add_task(async function arrow_engine_url() {
await doArrowTest("mozilla.or", UrlbarUtils.RESULT_TYPE.URL, false);
});

View File

@ -39,7 +39,7 @@ add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [
["browser.search.separatePrivateDefault.ui.enabled", false],
["browser.urlbar.scotchBonnet.enableOverride", false],
["browser.urlbar.suggest.quickactions", false],
],
});

View File

@ -25,7 +25,6 @@ add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [
["browser.urlbar.suggest.searches", true],
["browser.urlbar.scotchBonnet.enableOverride", false],
["browser.urlbar.maxHistoricalSearchSuggestions", 2],
],
});

View File

@ -11,9 +11,6 @@
let gMaxResults;
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
gMaxResults = Services.prefs.getIntPref("browser.urlbar.maxRichResults");
registerCleanupFunction(async function () {

View File

@ -36,9 +36,6 @@ var noEngineString;
SearchTestUtils.init(this);
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
let originalOrder = (await Services.search.getEngines()).map(e => e.id);
await SearchTestUtils.updateRemoteSettingsConfig(CONFIG);
appDefaultEngine = await Services.search.getDefault();

View File

@ -35,7 +35,7 @@ add_setup(async function () {
await TestUtils.waitForTick();
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
set: [["browser.urlbar.suggest.quickactions", false]],
});
// Add some URLs to populate both history and top sites. Each URL needs to

View File

@ -6,9 +6,6 @@ ChromeUtils.defineESModuleGetters(this, {
});
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
await SearchTestUtils.installSearchExtension({}, { setAsDefault: true });
let engine = Services.search.getEngineByName("Example");

View File

@ -14,9 +14,6 @@ const DEFAULT_HELP_URL =
"awesome-bar-result-menu";
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
// Add enough results to fill up the view.
await PlacesUtils.history.clear();
for (let i = 0; i < MAX_RESULTS; i++) {

View File

@ -4,10 +4,6 @@
"use strict";
add_task(async function test() {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
let results = [
new UrlbarResult(
UrlbarUtils.RESULT_TYPE.URL,

View File

@ -9,9 +9,6 @@ const ALIAS = "@enginealias";
let aliasEngine;
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
// Run this in a new tab, to ensure all the locationchange notifications have
// fired.
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser);

View File

@ -674,11 +674,9 @@ add_task(async function test_open_state() {
add_task(async function nimbusScotchBonnetEnableOverride() {
info("Setup initial local pref");
let defaultBranch = Services.prefs.getDefaultBranch("browser.urlbar.");
let initialValue = defaultBranch.getBoolPref("scotchBonnet.enableOverride");
defaultBranch.setBoolPref("scotchBonnet.enableOverride", false);
UrlbarPrefs.clear("scotchBonnet.enableOverride");
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
await TestUtils.waitForCondition(() => {
return BrowserTestUtils.isHidden(
gURLBar.querySelector("#urlbar-searchmode-switcher")
@ -699,7 +697,7 @@ add_task(async function nimbusScotchBonnetEnableOverride() {
Assert.ok(true, "Search mode switcher should be visible");
await cleanUpNimbusEnable();
defaultBranch.setBoolPref("scotchBonnet.enableOverride", initialValue);
await SpecialPowers.popPrefEnv();
});
add_task(async function nimbusLogEnabled() {

View File

@ -19,9 +19,6 @@ const TEST_SPACES = [" ", "\u3000", " \u3000", "\u3000 "];
let defaultEngine, aliasEngine;
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
defaultEngine = await SearchTestUtils.installOpenSearchEngine({
url: getRootDirectory(gTestPath) + TEST_ENGINE_BASENAME,
setAsDefault: true,

View File

@ -18,7 +18,7 @@ add_setup(async function () {
await Services.search.moveEngine(defaultEngine, 0);
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
set: [["browser.urlbar.suggest.quickactions", false]],
});
registerCleanupFunction(async () => {

View File

@ -16,9 +16,6 @@ const LINK_PAGE_URL =
// branches in setURI. Search mode should be exited in all cases, and the href
// in the link should be opened.
add_task(async function clickLink() {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
for (let test of [
// searchString, href to use in the link
[LINK_PAGE_URL, LINK_PAGE_URL],

View File

@ -10,9 +10,6 @@
// Tests that we exit search mode in the active tab when the search mode engine
// is removed.
add_task(async function activeTab() {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
let extension = await SearchTestUtils.installSearchExtension(
{},
{ skipUnload: true }

View File

@ -19,7 +19,6 @@ add_setup(async function () {
["browser.urlbar.autoFill", false],
// Special prefs for remote tabs.
["services.sync.username", "fake"],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
});

View File

@ -8,9 +8,6 @@
"use strict";
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
await PlacesUtils.history.clear();
await PlacesUtils.bookmarks.eraseEverything();

View File

@ -23,9 +23,6 @@ let suggestionsEngine;
let defaultEngine;
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
suggestionsEngine = await SearchTestUtils.installOpenSearchEngine({
url: getRootDirectory(gTestPath) + SUGGESTIONS_ENGINE_NAME,
});

View File

@ -11,10 +11,7 @@
add_task(async function test() {
// Avoid remote connections.
await SpecialPowers.pushPrefEnv({
set: [
["browser.search.suggest.enabled", false],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
set: [["browser.search.suggest.enabled", false]],
});
await BrowserTestUtils.withNewTab("about:robots", async () => {

View File

@ -17,7 +17,8 @@ add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [
["browser.urlbar.suggest.searches", true],
["browser.urlbar.scotchBonnet.enableOverride", false],
["browser.urlbar.suggest.quickactions", false],
["browser.urlbar.shortcuts.quickactions", false],
],
});
engine = await SearchTestUtils.installOpenSearchEngine({

View File

@ -29,7 +29,6 @@ add_setup(async function () {
"browser.newtabpage.activity-stream.default.sites",
"http://example.com/",
],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
});
await updateTopSites(sites => sites.length);

View File

@ -9,9 +9,6 @@
const ENGINE_NAME = "Example";
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
await SearchTestUtils.installSearchExtension({
name: ENGINE_NAME,
});

View File

@ -10,9 +10,6 @@
const TEST_ENGINE_NAME = "test engine";
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
await SearchTestUtils.installSearchExtension({
name: TEST_ENGINE_NAME,
keyword: "@test",

View File

@ -10,9 +10,6 @@
const BOOKMARK_URL = "http://www.example.com/browser_searchMode_pickResult.js";
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
// Add a bookmark so we can enter bookmarks search mode and pick it.
await PlacesUtils.bookmarks.eraseEverything();
await PlacesUtils.bookmarks.insert({

View File

@ -16,7 +16,7 @@ add_setup(async function () {
});
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
set: [["browser.urlbar.suggest.quickactions", false]],
});
if (UrlbarPrefs.getScotchBonnetPref("searchRestrictKeywords.featureGate")) {
await SpecialPowers.pushPrefEnv({

View File

@ -27,11 +27,6 @@ const URL = "http://example.com/";
const INITIAL_URL = "about:newtab";
// The following tasks make sure non-null search mode is restored.
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
});
add_task(async function initialPageOnRestore() {
await doTest({

View File

@ -13,9 +13,6 @@
// in order to hit different branches in setURI. Search mode should remain
// active or be exited as appropriate.
add_task(async function setURI() {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
for (let test of [
// initialURL, searchString, url, expectSearchMode

View File

@ -66,7 +66,7 @@ add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [
["browser.search.separatePrivateDefault.ui.enabled", false],
["browser.urlbar.scotchBonnet.enableOverride", false],
["browser.urlbar.suggest.quickactions", false],
["browser.urlbar.suggest.trending", false],
["browser.urlbar.suggest.recentsearches", false],
],
@ -112,6 +112,7 @@ add_task(async function emptySearch_behavior() {
},
]);
await UrlbarTestUtils.promisePopupClose(window);
await SpecialPowers.popPrefEnv();
});
await PlacesUtils.history.clear();
@ -140,6 +141,7 @@ add_task(async function emptySearch_local() {
]);
await UrlbarTestUtils.exitSearchMode(window, { clickClose: true });
await UrlbarTestUtils.promisePopupClose(window);
await SpecialPowers.popPrefEnv();
});
await PlacesUtils.history.clear();

View File

@ -10,7 +10,7 @@
// Enters search mode using the one-off buttons.
add_task(async function switchTabs() {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
set: [["browser.urlbar.suggest.quickactions", false]],
});
// Open three tabs. We'll enter search mode in tabs 0 and 2.

View File

@ -4,9 +4,6 @@
"use strict";
add_task(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
await BrowserTestUtils.withNewTab(
{ gBrowser, url: "about:blank" },
async function () {

View File

@ -3,9 +3,6 @@
let gDNSResolved = false;
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
registerCleanupFunction(function () {
Services.prefs.clearUserPref("browser.fixup.domainwhitelist.localhost");
});

View File

@ -13,7 +13,7 @@ ChromeUtils.defineESModuleGetters(this, {
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
set: [["browser.urlbar.suggest.quickactions", false]],
});
// We'll later replace this, so ensure it's restored.

View File

@ -10,9 +10,6 @@
const MAX_RESULTS = UrlbarPrefs.get("maxRichResults");
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
for (let i = 0; i < MAX_RESULTS; i++) {
await PlacesTestUtils.addVisits("http://example.com/" + i);
}

View File

@ -15,10 +15,7 @@ const BASE_URL =
add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [
["browser.urlbar.suggest.searches", false],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
set: [["browser.urlbar.suggest.searches", false]],
});
// Ensure initial state.
UrlbarTestUtils.getOneOffSearchButtons(window).invalidateCache();

View File

@ -11,9 +11,6 @@
const TEST_URL = `${TEST_BASE_URL}dummy_page.html`;
add_task(async function test_with_oneoff_button() {
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
info("Loading test page into first tab");
let promiseLoad = BrowserTestUtils.browserLoaded(
gBrowser.selectedBrowser,

View File

@ -14,10 +14,7 @@ add_setup(async function () {
false
);
await SpecialPowers.pushPrefEnv({
set: [
["browser.urlbar.suggest.quickactions", false],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
set: [["browser.urlbar.suggest.quickactions", false]],
});
for (let i = 0; i < UrlbarPrefs.get("maxRichResults"); i++) {

View File

@ -25,7 +25,6 @@ add_setup(async function () {
// Disable onboarding results for general tests. They are enabled in tests
// that specifically address onboarding.
["browser.urlbar.tabToSearch.onboard.interactionsLeft", 0],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
});

View File

@ -37,10 +37,7 @@ add_setup(async function () {
// Search results aren't shown in quantumbar unless search suggestions are
// enabled.
await SpecialPowers.pushPrefEnv({
set: [
["browser.urlbar.suggest.searches", true],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
set: [["browser.urlbar.suggest.searches", true]],
});
// When typing `@`, we are getting token alias engine results and restrict

View File

@ -128,10 +128,6 @@ add_setup(async function () {
set: [["browser.urlbar.showSearchSuggestionsFirst", false]],
});
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.scotchBonnet.enableOverride", false]],
});
// Make sure to restore the engine once we're done.
registerCleanupFunction(async function () {
Services.telemetry.canRecordExtended = oldCanRecord;

View File

@ -87,7 +87,6 @@ add_setup(async function () {
// Disable tab-to-search onboarding results for general tests. They are
// enabled in tests that specifically address onboarding.
["browser.urlbar.tabToSearch.onboard.interactionsLeft", 0],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
});

View File

@ -400,7 +400,6 @@ async function setup() {
["browser.urlbar.searchEngagementTelemetry.enabled", true],
["browser.urlbar.quickactions.enabled", true],
["browser.urlbar.secondaryActions.featureGate", true],
["browser.urlbar.scotchBonnet.enableOverride", false],
],
});