Commit fd37e0e9 authored by Mark Banner's avatar Mark Banner
Browse files

Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers

parent 9562a5e4
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -13,14 +13,11 @@ loadScripts(
ChromeUtils.defineESModuleGetters(this, {
  PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
  PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});

XPCOMUtils.defineLazyModuleGetters(this, {
  UrlbarProvider: "resource:///modules/UrlbarUtils.jsm",
  UrlbarProvidersManager: "resource:///modules/UrlbarProvidersManager.jsm",
  UrlbarResult: "resource:///modules/UrlbarResult.jsm",
  UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
  UrlbarUtils: "resource:///modules/UrlbarUtils.jsm",
  UrlbarProvider: "resource:///modules/UrlbarUtils.sys.mjs",
  UrlbarProvidersManager: "resource:///modules/UrlbarProvidersManager.sys.mjs",
  UrlbarResult: "resource:///modules/UrlbarResult.sys.mjs",
  UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.sys.mjs",
  UrlbarUtils: "resource:///modules/UrlbarUtils.sys.mjs",
});

function isEventForAutocompleteItem(event) {
+4 −1
Original line number Diff line number Diff line
@@ -6,9 +6,12 @@
/* import-globals-from ../../mochitest/role.js */
loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });

ChromeUtils.defineESModuleGetters(this, {
  UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.sys.mjs",
});

XPCOMUtils.defineLazyModuleGetters(this, {
  BrowserTestUtils: "resource://testing-common/BrowserTestUtils.jsm",
  UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
});

// Check that the URL bar manages accessibility
+2 −2
Original line number Diff line number Diff line
@@ -4,8 +4,8 @@

"use strict";

const { UrlbarTestUtils } = ChromeUtils.import(
  "resource://testing-common/UrlbarTestUtils.jsm"
const { UrlbarTestUtils } = ChromeUtils.importESModule(
  "resource://testing-common/UrlbarTestUtils.sys.mjs"
);

// Checking that the awesomebar popup gets COMBOBOX_LIST role instead of
+4 −1
Original line number Diff line number Diff line
@@ -32,8 +32,11 @@ XPCOMUtils.defineLazyPreferenceGetter(
  false
);

ChromeUtils.defineESModuleGetters(lazy, {
  UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
});

XPCOMUtils.defineLazyModuleGetters(lazy, {
  UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm",
  SpecialMessageActions:
    "resource://messaging-system/lib/SpecialMessageActions.jsm",
});
+2 −1
Original line number Diff line number Diff line
@@ -16,12 +16,13 @@ ChromeUtils.defineESModuleGetters(lazy, {

  SearchSuggestionController:
    "resource://gre/modules/SearchSuggestionController.sys.mjs",

  UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
});

XPCOMUtils.defineLazyModuleGetters(lazy, {
  FormHistory: "resource://gre/modules/FormHistory.jsm",
  PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
  UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm",
});

const MAX_LOCAL_SUGGESTIONS = 3;
Loading