Verified Commit 5d26d127 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

fixup! BB 31740: Remove some unnecessary RemoteSettings instances

BB 44153: Add search engine customization tests.

Change where we ignore upstream's block lists as the previous mechanism
made tests timeout.
parent 0d376fac
Loading
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@

/* eslint no-shadow: error, mozilla/no-aArgs: error */

import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
@@ -1426,6 +1427,10 @@ export class SearchService {
    // start listening straight away.
    Services.obs.addObserver(this, lazy.Region.REGION_TOPIC);

    this.#getIgnoreListAndSubscribe().catch(ex =>
      console.error(ex, "Search Service could not get the ignore list.")
    );

    this.#engineSelector = new lazy.SearchEngineSelector(
      this.#handleConfigurationUpdated.bind(this)
    );
@@ -1568,7 +1573,6 @@ export class SearchService {
   * handled via a sync listener.
   *
   */
  // eslint-disable-next-line no-unused-private-class-members
  async #getIgnoreListAndSubscribe() {
    let listener = this.#handleIgnoreListUpdated.bind(this);
    const current = await lazy.IgnoreLists.getAndSubscribe(listener);
@@ -1593,6 +1597,10 @@ export class SearchService {
   *   The event in the format received from RemoteSettings.
   */
  async #handleIgnoreListUpdated(eventData) {
    if (AppConstants.BASE_BROWSER_VERSION) {
      return;
    }

    lazy.logConsole.debug("#handleIgnoreListUpdated");
    const {
      data: { current },