mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
This commit is contained in:
parent
e29957943b
commit
4bfafd41fa
@ -10,9 +10,12 @@ loadScripts(
|
||||
{ name: "role.js", dir: MOCHITESTS_DIR }
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
UrlbarProvider: "resource:///modules/UrlbarUtils.jsm",
|
||||
UrlbarProvidersManager: "resource:///modules/UrlbarProvidersManager.jsm",
|
||||
UrlbarResult: "resource:///modules/UrlbarResult.jsm",
|
||||
|
@ -11,11 +11,9 @@ loadScripts(
|
||||
{ name: "states.js", dir: MOCHITESTS_DIR }
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
* Test visited link properties.
|
||||
|
@ -7,11 +7,9 @@
|
||||
/* import-globals-from ../../mochitest/states.js */
|
||||
loadScripts({ name: "states.js", dir: MOCHITESTS_DIR });
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
* Test rotor with heading
|
||||
|
@ -9,11 +9,9 @@ var EXPORTED_SYMBOLS = ["AboutReaderParent"];
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"ReaderMode",
|
||||
|
@ -9,11 +9,9 @@ var EXPORTED_SYMBOLS = ["ClickHandlerParent", "MiddleMousePasteHandlerParent"];
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUIUtils",
|
||||
"resource:///modules/PlacesUIUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PrivateBrowsingUtils",
|
||||
|
@ -8,11 +8,9 @@ const EXPORTED_SYMBOLS = ["LinkHandlerParent"];
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUIUtils",
|
||||
"resource:///modules/PlacesUIUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
});
|
||||
|
||||
let gTestListeners = new Set();
|
||||
|
||||
|
@ -15,6 +15,9 @@ ChromeUtils.import("resource://gre/modules/NotificationDB.jsm");
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
@ -55,9 +58,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
PanelMultiView: "resource:///modules/PanelMultiView.jsm",
|
||||
PanelView: "resource:///modules/PanelMultiView.jsm",
|
||||
PictureInPicture: "resource://gre/modules/PictureInPicture.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm",
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.jsm",
|
||||
PluralForm: "resource://gre/modules/PluralForm.jsm",
|
||||
Pocket: "chrome://pocket/content/Pocket.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
|
@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
const { PlacesTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
const { PlacesTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/PlacesTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { PermissionTestUtils } = ChromeUtils.import(
|
||||
|
@ -25,11 +25,9 @@ ChromeUtils.defineModuleGetter(
|
||||
"PromiseUtils",
|
||||
"resource://gre/modules/PromiseUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
});
|
||||
|
||||
let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
||||
|
||||
|
@ -5,9 +5,12 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
LinkHandlerParent: "resource:///actors/LinkHandlerParent.jsm",
|
||||
XPCShellContentUtils: "resource://testing-common/XPCShellContentUtils.jsm",
|
||||
});
|
||||
|
@ -7,16 +7,10 @@ ChromeUtils.defineModuleGetter(
|
||||
"AboutNewTab",
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"BrowserTestUtils",
|
||||
|
@ -2,16 +2,10 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
* Wait for url's page info (non-null description and preview url) to be set.
|
||||
|
@ -1,11 +1,14 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
EnterprisePolicyTesting:
|
||||
"resource://testing-common/EnterprisePolicyTesting.jsm",
|
||||
ExtensionCommon: "resource://gre/modules/ExtensionCommon.jsm",
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
|
||||
sinon: "resource://testing-common/Sinon.jsm",
|
||||
TelemetryTestUtils: "resource://testing-common/TelemetryTestUtils.jsm",
|
||||
});
|
||||
|
@ -1,10 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
PerfTestHelpers: "resource://testing-common/PerfTestHelpers.jsm",
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
|
||||
});
|
||||
|
||||
|
@ -2,11 +2,9 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PromiseUtils",
|
||||
|
@ -2,11 +2,9 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
* Called after opening a new window or switching windows, this will wait until
|
||||
|
@ -1,7 +1,7 @@
|
||||
requestLongerTimeout(2);
|
||||
|
||||
const { PlacesTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
const { PlacesTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/PlacesTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
// Bug 453440 - Test the timespan-based logic of the sanitizer code
|
||||
|
@ -22,11 +22,9 @@ ChromeUtils.defineModuleGetter(
|
||||
"Timer",
|
||||
"resource://gre/modules/Timer.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
});
|
||||
|
||||
const kMsecPerMin = 60 * 1000;
|
||||
const kUsecPerMin = 60 * 1000000;
|
||||
|
@ -2,10 +2,13 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
Downloads: "resource://gre/modules/Downloads.jsm",
|
||||
FormHistory: "resource://gre/modules/FormHistory.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
Sanitizer: "resource:///modules/Sanitizer.jsm",
|
||||
SiteDataTestUtils: "resource://testing-common/SiteDataTestUtils.jsm",
|
||||
PermissionTestUtils: "resource://testing-common/PermissionTestUtils.jsm",
|
||||
|
@ -19,9 +19,17 @@ const { AppConstants } = ChromeUtils.import(
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.sys.mjs",
|
||||
BookmarkJSONUtils: "resource://gre/modules/BookmarkJSONUtils.sys.mjs",
|
||||
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
|
||||
Interactions: "resource:///modules/Interactions.sys.mjs",
|
||||
PageDataService: "resource:///modules/pagedata/PageDataService.sys.mjs",
|
||||
PlacesBackups: "resource://gre/modules/PlacesBackups.sys.mjs",
|
||||
PlacesDBUtils: "resource://gre/modules/PlacesDBUtils.sys.mjs",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.sys.mjs",
|
||||
SnapshotMonitor: "resource:///modules/SnapshotMonitor.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
@ -36,8 +44,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
AsyncShutdown: "resource://gre/modules/AsyncShutdown.jsm",
|
||||
BackgroundUpdate: "resource://gre/modules/BackgroundUpdate.jsm",
|
||||
Blocklist: "resource://gre/modules/Blocklist.jsm",
|
||||
BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.jsm",
|
||||
BookmarkJSONUtils: "resource://gre/modules/BookmarkJSONUtils.jsm",
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm",
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.jsm",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
@ -56,7 +62,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
FxAccounts: "resource://gre/modules/FxAccounts.jsm",
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
Integration: "resource://gre/modules/Integration.jsm",
|
||||
Interactions: "resource:///modules/Interactions.jsm",
|
||||
Log: "resource://gre/modules/Log.jsm",
|
||||
LoginBreaches: "resource:///modules/LoginBreaches.jsm",
|
||||
NetUtil: "resource://gre/modules/NetUtil.jsm",
|
||||
@ -70,10 +75,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
PageThumbs: "resource://gre/modules/PageThumbs.jsm",
|
||||
PdfJs: "resource://pdf.js/PdfJs.jsm",
|
||||
PermissionUI: "resource:///modules/PermissionUI.jsm",
|
||||
PlacesBackups: "resource://gre/modules/PlacesBackups.jsm",
|
||||
PlacesDBUtils: "resource://gre/modules/PlacesDBUtils.jsm",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PluralForm: "resource://gre/modules/PluralForm.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
|
||||
@ -90,7 +91,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
|
||||
ShellService: "resource:///modules/ShellService.jsm",
|
||||
ShortcutUtils: "resource://gre/modules/ShortcutUtils.jsm",
|
||||
SnapshotMonitor: "resource:///modules/SnapshotMonitor.jsm",
|
||||
SpecialMessageActions:
|
||||
"resource://messaging-system/lib/SpecialMessageActions.jsm",
|
||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
|
||||
|
@ -22,6 +22,10 @@ const { E10SUtils } = ChromeUtils.import(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
LoginBreaches: "resource:///modules/LoginBreaches.jsm",
|
||||
LoginHelper: "resource://gre/modules/LoginHelper.jsm",
|
||||
@ -30,7 +34,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
MigrationUtils: "resource:///modules/MigrationUtils.jsm",
|
||||
OSKeyStore: "resource://gre/modules/OSKeyStore.jsm",
|
||||
UIState: "resource://services-sync/UIState.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Bug 1270678 - A test case to test does the favicon obey originAttributes.
|
||||
*/
|
||||
const { PlacesUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
const { PlacesUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PlacesUtils.sys.mjs"
|
||||
);
|
||||
let { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js");
|
||||
|
||||
|
@ -19,11 +19,9 @@ ChromeUtils.defineModuleGetter(
|
||||
"Preferences",
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"AddonManager",
|
||||
|
@ -36,13 +36,16 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
NetUtil: "resource://gre/modules/NetUtil.jsm",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
DownloadHistory: "resource://gre/modules/DownloadHistory.jsm",
|
||||
Downloads: "resource://gre/modules/Downloads.jsm",
|
||||
DownloadUtils: "resource://gre/modules/DownloadUtils.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
});
|
||||
|
||||
|
@ -7,6 +7,10 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
Downloads: "resource://gre/modules/Downloads.jsm",
|
||||
@ -14,7 +18,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
DownloadsViewUI: "resource:///modules/DownloadsViewUI.jsm",
|
||||
FileUtils: "resource://gre/modules/FileUtils.jsm",
|
||||
NetUtil: "resource://gre/modules/NetUtil.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -50,11 +50,9 @@ ChromeUtils.defineModuleGetter(
|
||||
"NetUtil",
|
||||
"resource://gre/modules/NetUtil.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
const { Integration } = ChromeUtils.import(
|
||||
"resource://gre/modules/Integration.jsm"
|
||||
|
@ -3,11 +3,9 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
});
|
||||
|
||||
let win;
|
||||
|
||||
|
@ -24,11 +24,9 @@ ChromeUtils.defineModuleGetter(
|
||||
"FileUtils",
|
||||
"resource://gre/modules/FileUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"HttpServer",
|
||||
|
@ -45,11 +45,9 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
const PREF_LOGLEVEL = "browser.policies.loglevel";
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const { PlacesUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
const { PlacesUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PlacesUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const FAVICON_DATA =
|
||||
|
@ -10,8 +10,8 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
var { ExtensionError } = ExtensionUtils;
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
var { normalizeTime } = ExtensionCommon;
|
||||
|
@ -12,11 +12,9 @@ ChromeUtils.defineModuleGetter(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
var { DefaultMap, ExtensionError, parseMatchPatterns } = ExtensionUtils;
|
||||
|
||||
|
@ -6,11 +6,10 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"ExtensionSearchHandler",
|
||||
"resource://gre/modules/ExtensionSearchHandler.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
ExtensionSearchHandler:
|
||||
"resource://gre/modules/ExtensionSearchHandler.sys.mjs",
|
||||
});
|
||||
|
||||
this.omnibox = class extends ExtensionAPIPersistent {
|
||||
PERSISTENT_EVENTS = {
|
||||
|
@ -7,11 +7,9 @@ ChromeUtils.defineModuleGetter(
|
||||
"FormHistory",
|
||||
"resource://gre/modules/FormHistory.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
const REFERENCE_DATE = Date.now();
|
||||
|
||||
|
@ -2,16 +2,10 @@
|
||||
/* vim: set sts=2 sw=2 et tw=80: */
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
const OLD_URL = "http://example.com/";
|
||||
const RECENT_URL = "http://example.com/2/";
|
||||
|
@ -5,11 +5,11 @@
|
||||
const { AboutNewTab } = ChromeUtils.import(
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
);
|
||||
const { PlacesTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
const { PlacesTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/PlacesTestUtils.sys.mjs"
|
||||
);
|
||||
const { PlacesUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
const { PlacesUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PlacesUtils.sys.mjs"
|
||||
);
|
||||
const {
|
||||
ExtensionUtils: { makeDataURI },
|
||||
|
@ -1,8 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
|
||||
UrlbarProvidersManager: "resource:///modules/UrlbarProvidersManager.jsm",
|
||||
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
|
||||
});
|
||||
|
@ -2,12 +2,8 @@
|
||||
/* vim: set sts=2 sw=2 et tw=80: */
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
SearchTestUtils: "resource://testing-common/SearchTestUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
|
@ -6,11 +6,9 @@ const { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
AddonTestUtils.init(this);
|
||||
AddonTestUtils.overrideCertDB();
|
||||
|
@ -6,16 +6,10 @@ const { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"ExtensionCommon",
|
||||
|
@ -1,13 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
const { PlacesUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
const { PlacesUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PlacesUtils.sys.mjs"
|
||||
);
|
||||
const { NewTabUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/NewTabUtils.jsm"
|
||||
);
|
||||
const { PlacesTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
const { PlacesTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/PlacesTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const SEARCH_SHORTCUTS_EXPERIMENT_PREF =
|
||||
|
@ -8,11 +8,9 @@ ChromeUtils.defineModuleGetter(
|
||||
"BrowserUtils",
|
||||
"resource://gre/modules/BrowserUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUIUtils",
|
||||
"resource:///modules/PlacesUIUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
});
|
||||
|
||||
// Cutoff of 1.5 minutes + 1 second to determine what text string to display
|
||||
export const nowThresholdMs = 91000;
|
||||
|
@ -14,9 +14,13 @@ const { MigrationUtils } = ChromeUtils.import(
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
Sqlite: "resource://gre/modules/Sqlite.jsm",
|
||||
});
|
||||
|
||||
|
@ -23,12 +23,16 @@ const { MigratorPrototype, MigrationUtils } = ChromeUtils.import(
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ChromeMigrationUtils: "resource:///modules/ChromeMigrationUtils.jsm",
|
||||
NetUtil: "resource://gre/modules/NetUtil.jsm",
|
||||
OS: "resource://gre/modules/osfile.jsm",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
Qihoo360seMigrationUtils: "resource:///modules/360seMigrationUtils.jsm",
|
||||
});
|
||||
|
||||
|
@ -18,16 +18,10 @@ const { MSMigrationUtils } = ChromeUtils.import(
|
||||
"resource:///modules/MSMigrationUtils.jsm"
|
||||
);
|
||||
const lazy = {};
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUIUtils",
|
||||
"resource:///modules/PlacesUIUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"ESEDBReader",
|
||||
|
@ -19,11 +19,9 @@ const { MigrationUtils, MigratorPrototype } = ChromeUtils.import(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesBackups",
|
||||
"resource://gre/modules/PlacesBackups.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesBackups: "resource://gre/modules/PlacesBackups.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"SessionMigration",
|
||||
|
@ -25,11 +25,9 @@ ChromeUtils.defineModuleGetter(
|
||||
"ctypes",
|
||||
"resource://gre/modules/ctypes.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"OSCrypto",
|
||||
|
@ -15,16 +15,10 @@ const { MigrationUtils } = ChromeUtils.import(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUIUtils",
|
||||
"resource:///modules/PlacesUIUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"WindowsRegistry",
|
||||
|
@ -18,21 +18,17 @@ const { AppConstants } = ChromeUtils.import(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"BookmarkHTMLUtils",
|
||||
"resource://gre/modules/BookmarkHTMLUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"LoginHelper",
|
||||
"resource://gre/modules/LoginHelper.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PromiseUtils",
|
||||
|
@ -19,16 +19,10 @@ ChromeUtils.defineModuleGetter(
|
||||
"PropertyListUtils",
|
||||
"resource://gre/modules/PropertyListUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUIUtils",
|
||||
"resource:///modules/PlacesUIUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"FormHistory",
|
||||
|
@ -7,8 +7,8 @@ var { LoginHelper } = ChromeUtils.import(
|
||||
"resource://gre/modules/LoginHelper.jsm"
|
||||
);
|
||||
var { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
var { PlacesUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
var { PlacesUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PlacesUtils.sys.mjs"
|
||||
);
|
||||
var { Preferences } = ChromeUtils.import(
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
@ -22,8 +22,8 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
var { TestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/TestUtils.jsm"
|
||||
);
|
||||
var { PlacesTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
var { PlacesTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/PlacesTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
|
@ -7,8 +7,8 @@ const { CustomizableUI } = ChromeUtils.import(
|
||||
"resource:///modules/CustomizableUI.jsm"
|
||||
);
|
||||
|
||||
const { PlacesUIUtils } = ChromeUtils.import(
|
||||
"resource:///modules/PlacesUIUtils.jsm"
|
||||
const { PlacesUIUtils } = ChromeUtils.importESModule(
|
||||
"resource:///modules/PlacesUIUtils.sys.mjs"
|
||||
);
|
||||
|
||||
let rootDir = do_get_file("chromefiles/", true);
|
||||
|
@ -8,11 +8,11 @@ if (SpecialPowers.useRemoteSubframes) {
|
||||
|
||||
const CC = Components.Constructor;
|
||||
|
||||
const { PlacesUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
const { PlacesUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PlacesUtils.sys.mjs"
|
||||
);
|
||||
const { PlacesTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
const { PlacesTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/PlacesTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
let EventUtils = {};
|
||||
|
@ -17,11 +17,9 @@ ChromeUtils.defineModuleGetter(
|
||||
"PromiseUtils",
|
||||
"resource://gre/modules/PromiseUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
});
|
||||
|
||||
const TEST_SITE = "http://example.net";
|
||||
const TEST_THIRD_PARTY_SITE = "http://mochi.test:8888";
|
||||
|
@ -9,8 +9,5 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PageDataSchema: "resource:///modules/pagedata/PageDataSchema.sys.mjs",
|
||||
PageDataService: "resource:///modules/pagedata/PageDataService.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
Snapshots: "resource:///modules/Snapshots.jsm",
|
||||
Snapshots: "resource:///modules/Snapshots.sys.mjs",
|
||||
});
|
||||
|
@ -2,15 +2,11 @@
|
||||
* 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 { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
CommonNames: "resource:///modules/CommonNames.jsm",
|
||||
SnapshotGroups: "resource:///modules/SnapshotGroups.jsm",
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
CommonNames: "resource:///modules/CommonNames.sys.mjs",
|
||||
SnapshotGroups: "resource:///modules/SnapshotGroups.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -11,16 +11,16 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
InteractionsBlocklist: "resource:///modules/InteractionsBlocklist.sys.mjs",
|
||||
PageDataService: "resource:///modules/pagedata/PageDataService.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
Snapshots: "resource:///modules/Snapshots.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
clearTimeout: "resource://gre/modules/Timer.jsm",
|
||||
InteractionsBlocklist: "resource:///modules/InteractionsBlocklist.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
Snapshots: "resource:///modules/Snapshots.jsm",
|
||||
setTimeout: "resource://gre/modules/Timer.jsm",
|
||||
});
|
||||
|
||||
@ -182,10 +182,10 @@ class _Interactions {
|
||||
|
||||
ChromeUtils.registerWindowActor("Interactions", {
|
||||
parent: {
|
||||
moduleURI: "resource:///actors/InteractionsParent.jsm",
|
||||
esModuleURI: "resource:///actors/InteractionsParent.sys.mjs",
|
||||
},
|
||||
child: {
|
||||
moduleURI: "resource:///actors/InteractionsChild.jsm",
|
||||
esModuleURI: "resource:///actors/InteractionsChild.sys.mjs",
|
||||
events: {
|
||||
DOMContentLoaded: {},
|
||||
pagehide: { mozSystemGroup: true },
|
||||
|
@ -4,10 +4,6 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
@ -16,8 +12,8 @@ ChromeUtils.defineModuleGetter(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
InteractionsBlocklist: "resource:///modules/InteractionsBlocklist.jsm",
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
InteractionsBlocklist: "resource:///modules/InteractionsBlocklist.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -6,11 +6,9 @@
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"Interactions",
|
||||
"resource:///modules/Interactions.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
Interactions: "resource:///modules/Interactions.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
* Receives messages from InteractionsChild and passes them to the appropriate
|
||||
|
@ -2,15 +2,11 @@
|
||||
* 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 { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
Snapshots: "resource:///modules/Snapshots.jsm",
|
||||
SnapshotGroups: "resource:///modules/SnapshotGroups.jsm",
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
Snapshots: "resource:///modules/Snapshots.sys.mjs",
|
||||
SnapshotGroups: "resource:///modules/SnapshotGroups.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -15,13 +15,16 @@ const { AppConstants } = ChromeUtils.import(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
CustomizableUI: "resource:///modules/CustomizableUI.jsm",
|
||||
MigrationUtils: "resource:///modules/MigrationUtils.jsm",
|
||||
OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.jsm",
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PluralForm: "resource://gre/modules/PluralForm.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
|
||||
|
@ -10,14 +10,17 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesPreviews: "resource://gre/modules/PlacesPreviews.sys.mjs",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
SnapshotMonitor: "resource:///modules/SnapshotMonitor.sys.mjs",
|
||||
Snapshots: "resource:///modules/Snapshots.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BackgroundPageThumbs: "resource://gre/modules/BackgroundPageThumbs.jsm",
|
||||
PageThumbs: "resource://gre/modules/PageThumbs.jsm",
|
||||
PlacesPreviews: "resource://gre/modules/PlacesPreviews.jsm",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
Snapshots: "resource:///modules/Snapshots.jsm",
|
||||
SnapshotMonitor: "resource:///modules/SnapshotMonitor.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
|
@ -8,12 +8,15 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
DomainGroupBuilder: "resource:///modules/DomainGroupBuilder.sys.mjs",
|
||||
PinnedGroupBuilder: "resource:///modules/PinnedGroupBuilder.sys.mjs",
|
||||
Snapshots: "resource:///modules/Snapshots.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
clearTimeout: "resource://gre/modules/Timer.jsm",
|
||||
DomainGroupBuilder: "resource:///modules/DomainGroupBuilder.jsm",
|
||||
PinnedGroupBuilder: "resource:///modules/PinnedGroupBuilder.jsm",
|
||||
setTimeout: "resource://gre/modules/Timer.jsm",
|
||||
Snapshots: "resource:///modules/Snapshots.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
|
@ -8,8 +8,11 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
Snapshots: "resource:///modules/Snapshots.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
Snapshots: "resource:///modules/Snapshots.jsm",
|
||||
FilterAdult: "resource://activity-stream/lib/FilterAdult.jsm",
|
||||
});
|
||||
|
||||
|
@ -10,12 +10,15 @@ const { EventEmitter } = ChromeUtils.import(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
SnapshotScorer: "resource:///modules/SnapshotScorer.sys.mjs",
|
||||
Snapshots: "resource:///modules/Snapshots.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
DeferredTask: "resource://gre/modules/DeferredTask.jsm",
|
||||
FilterAdult: "resource://activity-stream/lib/FilterAdult.jsm",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm",
|
||||
Snapshots: "resource:///modules/Snapshots.jsm",
|
||||
SnapshotScorer: "resource:///modules/SnapshotScorer.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "logConsole", function() {
|
||||
|
@ -11,18 +11,18 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
CommonNames: "resource:///modules/CommonNames.sys.mjs",
|
||||
Interactions: "resource:///modules/Interactions.sys.mjs",
|
||||
InteractionsBlocklist: "resource:///modules/InteractionsBlocklist.sys.mjs",
|
||||
PageDataService: "resource:///modules/pagedata/PageDataService.sys.mjs",
|
||||
PlacesPreviews: "resource://gre/modules/PlacesPreviews.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BackgroundPageThumbs: "resource://gre/modules/BackgroundPageThumbs.jsm",
|
||||
CommonNames: "resource:///modules/CommonNames.jsm",
|
||||
Interactions: "resource:///modules/Interactions.jsm",
|
||||
InteractionsBlocklist: "resource:///modules/InteractionsBlocklist.jsm",
|
||||
PageThumbs: "resource://gre/modules/PageThumbs.jsm",
|
||||
PageThumbsStorage: "resource://gre/modules/PageThumbs.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PlacesPreviews: "resource://gre/modules/PlacesPreviews.jsm",
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -7,10 +7,14 @@
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm",
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
});
|
||||
XPCOMUtils.defineLazyScriptGetter(
|
||||
|
@ -3,11 +3,12 @@
|
||||
* 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/. */
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm",
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.jsm",
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
/* import-globals-from /browser/base/content/utilityOverlay.js */
|
||||
/* import-globals-from ./places.js */
|
||||
|
||||
|
@ -13,11 +13,14 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
CustomizableUI: "resource:///modules/CustomizableUI.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm",
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.jsm",
|
||||
});
|
||||
|
||||
var gEditItemOverlay = {
|
||||
|
@ -7,10 +7,14 @@
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm",
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
});
|
||||
XPCOMUtils.defineLazyScriptGetter(
|
||||
|
@ -12,11 +12,14 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
CustomizableUI: "resource:///modules/CustomizableUI.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm",
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.jsm",
|
||||
});
|
||||
|
||||
var gEditItemOverlay = {
|
||||
|
@ -34,16 +34,10 @@ ChromeUtils.defineModuleGetter(
|
||||
"MigrationUtils",
|
||||
"resource:///modules/MigrationUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"BookmarkJSONUtils",
|
||||
"resource://gre/modules/BookmarkJSONUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesBackups",
|
||||
"resource://gre/modules/PlacesBackups.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
BookmarkJSONUtils: "resource://gre/modules/BookmarkJSONUtils.sys.mjs",
|
||||
PlacesBackups: "resource://gre/modules/PlacesBackups.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"DownloadUtils",
|
||||
@ -498,8 +492,8 @@ var PlacesOrganizer = {
|
||||
let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
|
||||
let fpCallback = function fpCallback_done(aResult) {
|
||||
if (aResult != Ci.nsIFilePicker.returnCancel && fp.fileURL) {
|
||||
var { BookmarkHTMLUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/BookmarkHTMLUtils.jsm"
|
||||
var { BookmarkHTMLUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/BookmarkHTMLUtils.sys.mjs"
|
||||
);
|
||||
BookmarkHTMLUtils.importFromURL(fp.fileURL.spec).catch(Cu.reportError);
|
||||
}
|
||||
@ -521,8 +515,8 @@ var PlacesOrganizer = {
|
||||
let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
|
||||
let fpCallback = function fpCallback_done(aResult) {
|
||||
if (aResult != Ci.nsIFilePicker.returnCancel) {
|
||||
var { BookmarkHTMLUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/BookmarkHTMLUtils.jsm"
|
||||
var { BookmarkHTMLUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/BookmarkHTMLUtils.sys.mjs"
|
||||
);
|
||||
BookmarkHTMLUtils.exportToFile(fp.file.path).catch(Cu.reportError);
|
||||
}
|
||||
|
@ -4,15 +4,17 @@
|
||||
|
||||
/* eslint-env module */
|
||||
|
||||
const { Interactions } = ChromeUtils.import(
|
||||
"resource:///modules/Interactions.jsm"
|
||||
const { Interactions } = ChromeUtils.importESModule(
|
||||
"resource:///modules/Interactions.sys.mjs"
|
||||
);
|
||||
const { Snapshots } = ChromeUtils.import("resource:///modules/Snapshots.jsm");
|
||||
const { PlacesUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
const { Snapshots } = ChromeUtils.importESModule(
|
||||
"resource:///modules/Snapshots.sys.mjs"
|
||||
);
|
||||
const { PlacesDBUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PlacesDBUtils.jsm"
|
||||
const { PlacesUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PlacesUtils.sys.mjs"
|
||||
);
|
||||
const { PlacesDBUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PlacesDBUtils.sys.mjs"
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -1,8 +1,6 @@
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"TestUtils",
|
||||
|
@ -8,9 +8,12 @@
|
||||
const ALLOWED_TEST_URL = "http://mochi.test:8888/";
|
||||
const BLOCKED_TEST_URL = "https://example.com/browser";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
InteractionsBlocklist: "resource:///modules/InteractionsBlocklist.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
FilterAdult: "resource://activity-stream/lib/FilterAdult.jsm",
|
||||
InteractionsBlocklist: "resource:///modules/InteractionsBlocklist.jsm",
|
||||
});
|
||||
|
||||
add_setup(async function() {
|
||||
|
@ -6,9 +6,11 @@
|
||||
* Tests page view time recording for interactions.
|
||||
*/
|
||||
|
||||
const { Snapshots } = ChromeUtils.import("resource:///modules/Snapshots.jsm");
|
||||
const { PlacesTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
const { Snapshots } = ChromeUtils.importESModule(
|
||||
"resource:///modules/Snapshots.sys.mjs"
|
||||
);
|
||||
const { PlacesTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/PlacesTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
async function reset() {
|
||||
|
@ -2,8 +2,8 @@
|
||||
* 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 { Interactions } = ChromeUtils.import(
|
||||
"resource:///modules/Interactions.jsm"
|
||||
const { Interactions } = ChromeUtils.importESModule(
|
||||
"resource:///modules/Interactions.sys.mjs"
|
||||
);
|
||||
|
||||
const { sinon } = ChromeUtils.import("resource://testing-common/Sinon.jsm");
|
||||
|
@ -10,32 +10,22 @@ Services.scriptloader.loadSubScript(
|
||||
this
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"BrowserTestUtils",
|
||||
"resource://testing-common/BrowserTestUtils.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
window,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
window,
|
||||
"PlacesUIUtils",
|
||||
"resource:///modules/PlacesUIUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
window,
|
||||
"PlacesTransactions",
|
||||
"resource://gre/modules/PlacesTransactions.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(window, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineESModuleGetters(window, {
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
|
||||
});
|
||||
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
|
@ -16,11 +16,9 @@ if (commonFile) {
|
||||
|
||||
// Put any other stuff relative to this test folder below.
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUIUtils",
|
||||
"resource:///modules/PlacesUIUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
});
|
||||
|
||||
// Needed by some test that relies on having an app registered.
|
||||
const { updateAppInfo } = ChromeUtils.import(
|
||||
|
@ -6,18 +6,21 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
Interactions: "resource:///modules/Interactions.sys.mjs",
|
||||
PlacesPreviews: "resource://gre/modules/PlacesPreviews.sys.mjs",
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
SnapshotGroups: "resource:///modules/SnapshotGroups.sys.mjs",
|
||||
SnapshotMonitor: "resource:///modules/SnapshotMonitor.sys.mjs",
|
||||
SnapshotScorer: "resource:///modules/SnapshotScorer.sys.mjs",
|
||||
SnapshotSelector: "resource:///modules/SnapshotSelector.sys.mjs",
|
||||
Snapshots: "resource:///modules/Snapshots.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
Interactions: "resource:///modules/Interactions.jsm",
|
||||
PageThumbs: "resource://gre/modules/PageThumbs.jsm",
|
||||
PlacesPreviews: "resource://gre/modules/PlacesPreviews.jsm",
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
setTimeout: "resource://gre/modules/Timer.jsm",
|
||||
SnapshotGroups: "resource:///modules/SnapshotGroups.jsm",
|
||||
Snapshots: "resource:///modules/Snapshots.jsm",
|
||||
SnapshotMonitor: "resource:///modules/SnapshotMonitor.jsm",
|
||||
SnapshotScorer: "resource:///modules/SnapshotScorer.jsm",
|
||||
SnapshotSelector: "resource:///modules/SnapshotSelector.jsm",
|
||||
TestUtils: "resource://testing-common/TestUtils.jsm",
|
||||
});
|
||||
|
||||
|
@ -5,11 +5,9 @@
|
||||
* Tests for ensuring the domain builder works correctly.
|
||||
*/
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"DomainGroupBuilder",
|
||||
"resource:///modules/DomainGroupBuilder.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
DomainGroupBuilder: "resource:///modules/DomainGroupBuilder.sys.mjs",
|
||||
});
|
||||
|
||||
const TEST_URLS = [
|
||||
"https://example.com/1",
|
||||
|
@ -6,11 +6,9 @@
|
||||
* incremental update.
|
||||
*/
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"DomainGroupBuilder",
|
||||
"resource:///modules/DomainGroupBuilder.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
DomainGroupBuilder: "resource:///modules/DomainGroupBuilder.sys.mjs",
|
||||
});
|
||||
|
||||
const TEST_URLS = [
|
||||
"https://example.com/1",
|
||||
|
@ -5,11 +5,9 @@
|
||||
* Tests for ensuring the domain builder works correctly.
|
||||
*/
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PinnedGroupBuilder",
|
||||
"resource:///modules/PinnedGroupBuilder.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PinnedGroupBuilder: "resource:///modules/PinnedGroupBuilder.sys.mjs",
|
||||
});
|
||||
|
||||
const TEST_PERSISTED_URLS = ["https://example.com/1", "https://example.com/2"];
|
||||
const TEST_EXTRA_PERSISTED_URL = "https://example.com/3";
|
||||
|
@ -5,8 +5,8 @@
|
||||
* Tests that blocked sites are caught by InteractionsBlocklist.
|
||||
*/
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
InteractionsBlocklist: "resource:///modules/InteractionsBlocklist.jsm",
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
InteractionsBlocklist: "resource:///modules/InteractionsBlocklist.sys.mjs",
|
||||
});
|
||||
|
||||
let BLOCKED_URLS = [
|
||||
|
@ -7,10 +7,14 @@
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.jsm",
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
});
|
||||
XPCOMUtils.defineLazyScriptGetter(
|
||||
|
@ -60,6 +60,10 @@ XPCOMUtils.defineLazyServiceGetters(this, {
|
||||
gMIMEService: ["@mozilla.org/mime;1", "nsIMIMEService"],
|
||||
});
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AMTelemetry: "resource://gre/modules/AddonManager.jsm",
|
||||
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
|
||||
@ -76,7 +80,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
LoginHelper: "resource://gre/modules/LoginHelper.jsm",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm",
|
||||
OSKeyStore: "resource://gre/modules/OSKeyStore.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
SelectionChangedMenulist: "resource:///modules/SelectionChangedMenulist.jsm",
|
||||
ShortcutUtils: "resource://gre/modules/ShortcutUtils.jsm",
|
||||
SiteDataManager: "resource:///modules/SiteDataManager.jsm",
|
||||
|
@ -4,16 +4,10 @@
|
||||
var { PromiseUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PromiseUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"TestUtils",
|
||||
|
@ -17,11 +17,9 @@ ChromeUtils.defineModuleGetter(
|
||||
"resource:///modules/sessionstore/SessionStore.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PlacesUIUtils",
|
||||
"resource:///modules/PlacesUIUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
|
||||
});
|
||||
|
||||
var navigatorBundle = Services.strings.createBundle(
|
||||
"chrome://browser/locale/browser.properties"
|
||||
|
@ -9,12 +9,12 @@
|
||||
|
||||
const RESTRICT_TOKEN_OPENPAGE = "%";
|
||||
|
||||
const { PlacesTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
const { PlacesTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/PlacesTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { PlacesUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/PlacesUtils.jsm"
|
||||
const { PlacesUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PlacesUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { UrlbarProviderOpenTabs } = ChromeUtils.import(
|
||||
|
@ -47,11 +47,11 @@ add_task(async function test_default_bookmark_toolbar_visibility() {
|
||||
* if the toolbar has > 3 (NUM_TOOLBAR_BOOKMARKS_TO_UNHIDE) bookmarks.
|
||||
*/
|
||||
add_task(async function test_bookmark_toolbar_visible_when_populated() {
|
||||
const { Bookmarks } = ChromeUtils.import(
|
||||
"resource://gre/modules/Bookmarks.jsm"
|
||||
const { Bookmarks } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Bookmarks.sys.mjs"
|
||||
);
|
||||
const { PlacesUIUtils } = ChromeUtils.import(
|
||||
"resource:///modules/PlacesUIUtils.jsm"
|
||||
const { PlacesUIUtils } = ChromeUtils.importESModule(
|
||||
"resource:///modules/PlacesUIUtils.sys.mjs"
|
||||
);
|
||||
|
||||
let bookmark = {
|
||||
|
@ -10,8 +10,8 @@ const UI_VERSION = 120;
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
const { PlacesUIUtils } = ChromeUtils.import(
|
||||
"resource:///modules/PlacesUIUtils.jsm"
|
||||
const { PlacesUIUtils } = ChromeUtils.importESModule(
|
||||
"resource:///modules/PlacesUIUtils.sys.mjs"
|
||||
);
|
||||
|
||||
add_task(async function has_not_used_ctrl_tab_and_its_off() {
|
||||
|
@ -16,11 +16,11 @@ const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
FormHistory: "resource://gre/modules/FormHistory.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm",
|
||||
UrlbarProvidersManager: "resource:///modules/UrlbarProvidersManager.jsm",
|
||||
UrlbarTokenizer: "resource:///modules/UrlbarTokenizer.jsm",
|
||||
|
@ -17,6 +17,8 @@ const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
|
||||
ExtensionSearchHandler:
|
||||
"resource://gre/modules/ExtensionSearchHandler.sys.mjs",
|
||||
SearchUIUtils: "resource:///modules/SearchUIUtils.sys.mjs",
|
||||
SearchUtils: "resource://gre/modules/SearchUtils.sys.mjs",
|
||||
});
|
||||
@ -25,7 +27,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.jsm",
|
||||
CONTEXTUAL_SERVICES_PING_TYPES:
|
||||
"resource:///modules/PartnerLinkAttribution.jsm",
|
||||
ExtensionSearchHandler: "resource://gre/modules/ExtensionSearchHandler.jsm",
|
||||
ObjectUtils: "resource://gre/modules/ObjectUtils.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
|
||||
|
@ -20,9 +20,12 @@ const { UrlbarProvider, UrlbarUtils } = ChromeUtils.import(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
AboutPagesUtils: "resource://gre/modules/AboutPagesUtils.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm",
|
||||
UrlbarResult: "resource:///modules/UrlbarResult.jsm",
|
||||
UrlbarSearchUtils: "resource:///modules/UrlbarSearchUtils.jsm",
|
||||
|
@ -23,8 +23,11 @@ const { UrlbarProvider, UrlbarUtils } = ChromeUtils.import(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm",
|
||||
UrlbarProviderOpenTabs: "resource:///modules/UrlbarProviderOpenTabs.jsm",
|
||||
UrlbarResult: "resource:///modules/UrlbarResult.jsm",
|
||||
|
@ -21,8 +21,12 @@ const { SkippableTimer, UrlbarProvider, UrlbarUtils } = ChromeUtils.import(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ExtensionSearchHandler:
|
||||
"resource://gre/modules/ExtensionSearchHandler.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ExtensionSearchHandler: "resource://gre/modules/ExtensionSearchHandler.jsm",
|
||||
UrlbarResult: "resource:///modules/UrlbarResult.jsm",
|
||||
});
|
||||
|
||||
|
@ -21,8 +21,11 @@ const { UrlbarProvider, UrlbarUtils } = ChromeUtils.import(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
UrlbarProvidersManager: "resource:///modules/UrlbarProvidersManager.jsm",
|
||||
UrlbarResult: "resource:///modules/UrlbarResult.jsm",
|
||||
});
|
||||
|
@ -108,10 +108,13 @@ const { UrlbarProvider, UrlbarUtils } = ChromeUtils.import(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
KeywordUtils: "resource://gre/modules/KeywordUtils.jsm",
|
||||
ObjectUtils: "resource://gre/modules/ObjectUtils.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
|
||||
Sqlite: "resource://gre/modules/Sqlite.jsm",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm",
|
||||
|
@ -20,8 +20,11 @@ const { UrlbarProvider, UrlbarUtils } = ChromeUtils.import(
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
SyncedTabs: "resource://services-sync/SyncedTabs.jsm",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm",
|
||||
UrlbarResult: "resource:///modules/UrlbarResult.jsm",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user