Bug 1822010 - Convert toolkit/components/url-classifier to ES modules. r=perftest-reviewers,webcompat-reviewers,geckoview-reviewers,devtools-reviewers,twisniewski,valentin,m_kato,anti-tracking-reviewers,timhuang,sparky
Differential Revision: https://phabricator.services.mozilla.com/D173390
This commit is contained in:
@@ -5,11 +5,9 @@
|
|||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineModuleGetter(
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
lazy,
|
SafeBrowsing: "resource://gre/modules/SafeBrowsing.sys.mjs",
|
||||||
"SafeBrowsing",
|
});
|
||||||
"resource://gre/modules/SafeBrowsing.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
function getSiteBlockedErrorDetails(docShell) {
|
function getSiteBlockedErrorDetails(docShell) {
|
||||||
let blockedInfo = {};
|
let blockedInfo = {};
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||||
PromptUtils: "resource://gre/modules/PromptUtils.sys.mjs",
|
PromptUtils: "resource://gre/modules/PromptUtils.sys.mjs",
|
||||||
ReaderMode: "resource://gre/modules/ReaderMode.sys.mjs",
|
ReaderMode: "resource://gre/modules/ReaderMode.sys.mjs",
|
||||||
|
SafeBrowsing: "resource://gre/modules/SafeBrowsing.sys.mjs",
|
||||||
Sanitizer: "resource:///modules/Sanitizer.sys.mjs",
|
Sanitizer: "resource:///modules/Sanitizer.sys.mjs",
|
||||||
SaveToPocket: "chrome://pocket/content/SaveToPocket.sys.mjs",
|
SaveToPocket: "chrome://pocket/content/SaveToPocket.sys.mjs",
|
||||||
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
|
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
|
||||||
@@ -93,7 +94,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||||||
PanelMultiView: "resource:///modules/PanelMultiView.jsm",
|
PanelMultiView: "resource:///modules/PanelMultiView.jsm",
|
||||||
PanelView: "resource:///modules/PanelMultiView.jsm",
|
PanelView: "resource:///modules/PanelMultiView.jsm",
|
||||||
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
|
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
|
||||||
SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm",
|
|
||||||
SiteDataManager: "resource:///modules/SiteDataManager.jsm",
|
SiteDataManager: "resource:///modules/SiteDataManager.jsm",
|
||||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
|
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
|
||||||
Translation: "resource:///modules/translation/TranslationParent.jsm",
|
Translation: "resource:///modules/translation/TranslationParent.jsm",
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||||||
"resource://gre/modules/ContentBlockingAllowList.sys.mjs",
|
"resource://gre/modules/ContentBlockingAllowList.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
var { UrlClassifierTestUtils } = ChromeUtils.import(
|
var { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
async function openProtectionsPanel(toast, win = window) {
|
async function openProtectionsPanel(toast, win = window) {
|
||||||
|
|||||||
@@ -17,18 +17,14 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
BookmarkJSONUtils: "resource://gre/modules/BookmarkJSONUtils.sys.mjs",
|
BookmarkJSONUtils: "resource://gre/modules/BookmarkJSONUtils.sys.mjs",
|
||||||
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
|
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
|
||||||
BuiltInThemes: "resource:///modules/BuiltInThemes.sys.mjs",
|
BuiltInThemes: "resource:///modules/BuiltInThemes.sys.mjs",
|
||||||
|
|
||||||
ContextualIdentityService:
|
ContextualIdentityService:
|
||||||
"resource://gre/modules/ContextualIdentityService.sys.mjs",
|
"resource://gre/modules/ContextualIdentityService.sys.mjs",
|
||||||
|
|
||||||
Corroborate: "resource://gre/modules/Corroborate.sys.mjs",
|
Corroborate: "resource://gre/modules/Corroborate.sys.mjs",
|
||||||
DAPTelemetrySender: "resource://gre/modules/DAPTelemetrySender.sys.mjs",
|
DAPTelemetrySender: "resource://gre/modules/DAPTelemetrySender.sys.mjs",
|
||||||
DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs",
|
DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs",
|
||||||
DoHController: "resource:///modules/DoHController.sys.mjs",
|
DoHController: "resource:///modules/DoHController.sys.mjs",
|
||||||
|
|
||||||
DownloadsViewableInternally:
|
DownloadsViewableInternally:
|
||||||
"resource:///modules/DownloadsViewableInternally.sys.mjs",
|
"resource:///modules/DownloadsViewableInternally.sys.mjs",
|
||||||
|
|
||||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||||
FeatureGate: "resource://featuregates/FeatureGate.sys.mjs",
|
FeatureGate: "resource://featuregates/FeatureGate.sys.mjs",
|
||||||
FxAccounts: "resource://gre/modules/FxAccounts.sys.mjs",
|
FxAccounts: "resource://gre/modules/FxAccounts.sys.mjs",
|
||||||
@@ -51,17 +47,14 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
PluginManager: "resource:///actors/PluginParent.sys.mjs",
|
PluginManager: "resource:///actors/PluginParent.sys.mjs",
|
||||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||||
ProvenanceData: "resource:///modules/ProvenanceData.sys.mjs",
|
ProvenanceData: "resource:///modules/ProvenanceData.sys.mjs",
|
||||||
|
|
||||||
PublicSuffixList:
|
PublicSuffixList:
|
||||||
"resource://gre/modules/netwerk-dns/PublicSuffixList.sys.mjs",
|
"resource://gre/modules/netwerk-dns/PublicSuffixList.sys.mjs",
|
||||||
|
|
||||||
QuickSuggest: "resource:///modules/QuickSuggest.sys.mjs",
|
QuickSuggest: "resource:///modules/QuickSuggest.sys.mjs",
|
||||||
RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs",
|
RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs",
|
||||||
|
|
||||||
RemoteSecuritySettings:
|
RemoteSecuritySettings:
|
||||||
"resource://gre/modules/psm/RemoteSecuritySettings.sys.mjs",
|
"resource://gre/modules/psm/RemoteSecuritySettings.sys.mjs",
|
||||||
|
|
||||||
RemoteSettings: "resource://services-settings/remote-settings.sys.mjs",
|
RemoteSettings: "resource://services-settings/remote-settings.sys.mjs",
|
||||||
|
SafeBrowsing: "resource://gre/modules/SafeBrowsing.sys.mjs",
|
||||||
SaveToPocket: "chrome://pocket/content/SaveToPocket.sys.mjs",
|
SaveToPocket: "chrome://pocket/content/SaveToPocket.sys.mjs",
|
||||||
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
|
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
|
||||||
SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.sys.mjs",
|
SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.sys.mjs",
|
||||||
@@ -69,10 +62,8 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
|
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
|
||||||
ShellService: "resource:///modules/ShellService.sys.mjs",
|
ShellService: "resource:///modules/ShellService.sys.mjs",
|
||||||
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
|
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
|
||||||
|
|
||||||
SpecialMessageActions:
|
SpecialMessageActions:
|
||||||
"resource://messaging-system/lib/SpecialMessageActions.sys.mjs",
|
"resource://messaging-system/lib/SpecialMessageActions.sys.mjs",
|
||||||
|
|
||||||
TRRRacer: "resource:///modules/TRRPerformance.sys.mjs",
|
TRRRacer: "resource:///modules/TRRPerformance.sys.mjs",
|
||||||
TelemetryUtils: "resource://gre/modules/TelemetryUtils.sys.mjs",
|
TelemetryUtils: "resource://gre/modules/TelemetryUtils.sys.mjs",
|
||||||
UIState: "resource://services-sync/UIState.sys.mjs",
|
UIState: "resource://services-sync/UIState.sys.mjs",
|
||||||
@@ -102,7 +93,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||||||
"resource://activity-stream/lib/OnboardingMessageProvider.jsm",
|
"resource://activity-stream/lib/OnboardingMessageProvider.jsm",
|
||||||
PageActions: "resource:///modules/PageActions.jsm",
|
PageActions: "resource:///modules/PageActions.jsm",
|
||||||
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
|
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
|
||||||
SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm",
|
|
||||||
Sanitizer: "resource:///modules/Sanitizer.jsm",
|
Sanitizer: "resource:///modules/Sanitizer.jsm",
|
||||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
|
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
|
||||||
TabUnloader: "resource:///modules/TabUnloader.jsm",
|
TabUnloader: "resource:///modules/TabUnloader.jsm",
|
||||||
@@ -306,7 +296,6 @@ let JSWINDOWACTORS = {
|
|||||||
|
|
||||||
matches: ["about:plugins"],
|
matches: ["about:plugins"],
|
||||||
},
|
},
|
||||||
|
|
||||||
AboutPocket: {
|
AboutPocket: {
|
||||||
parent: {
|
parent: {
|
||||||
esModuleURI: "resource:///actors/AboutPocketParent.sys.mjs",
|
esModuleURI: "resource:///actors/AboutPocketParent.sys.mjs",
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
Services.cookies.QueryInterface(Ci.nsICookieService);
|
Services.cookies.QueryInterface(Ci.nsICookieService);
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ const DISABLE_SHIM4_PREF = "extensions.webcompat.disabled_shims.MochitestShim4";
|
|||||||
const GLOBAL_PREF = "extensions.webcompat.enable_shims";
|
const GLOBAL_PREF = "extensions.webcompat.enable_shims";
|
||||||
const TRACKING_PREF = "privacy.trackingprotection.enabled";
|
const TRACKING_PREF = "privacy.trackingprotection.enabled";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
async function testShimRuns(
|
async function testShimRuns(
|
||||||
|
|||||||
@@ -2,17 +2,14 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
* 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/. */
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
import { setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||||
import { BrowserTestUtils } from "resource://testing-common/BrowserTestUtils.sys.mjs";
|
import { BrowserTestUtils } from "resource://testing-common/BrowserTestUtils.sys.mjs";
|
||||||
|
import { setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||||
|
import { UrlClassifierTestUtils } from "resource://testing-common/UrlClassifierTestUtils.sys.mjs";
|
||||||
|
|
||||||
import { SitePermissions } from "resource:///modules/SitePermissions.sys.mjs";
|
import { SitePermissions } from "resource:///modules/SitePermissions.sys.mjs";
|
||||||
|
|
||||||
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
|
||||||
|
|
||||||
let { UrlClassifierTestUtils } = ChromeUtils.import(
|
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const CC_SELECTORS = ["#identity-popup", "#urlbar-input-container"];
|
const CC_SELECTORS = ["#identity-popup", "#urlbar-input-container"];
|
||||||
const PP_SELECTORS = ["#protections-popup", "#urlbar-input-container"];
|
const PP_SELECTORS = ["#protections-popup", "#urlbar-input-container"];
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const TEST_URI =
|
const TEST_URI =
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ const LEARN_MORE_URI =
|
|||||||
"https://developer.mozilla.org/docs/Web/API/Document/requestStorageAccess" +
|
"https://developer.mozilla.org/docs/Web/API/Document/requestStorageAccess" +
|
||||||
DOCS_GA_PARAMS;
|
DOCS_GA_PARAMS;
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
UrlClassifierTestUtils.addTestTrackers();
|
UrlClassifierTestUtils.addTestTrackers();
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ const COOKIE_BEHAVIORS = {
|
|||||||
PARTITION_FOREIGN: 5,
|
PARTITION_FOREIGN: 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
registerCleanupFunction(async function() {
|
registerCleanupFunction(async function() {
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ const COOKIE_BEHAVIORS = {
|
|||||||
REJECT_TRACKER: 4,
|
REJECT_TRACKER: 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
UrlClassifierTestUtils.addTestTrackers();
|
UrlClassifierTestUtils.addTestTrackers();
|
||||||
registerCleanupFunction(function() {
|
registerCleanupFunction(function() {
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ const STORAGE_BLOCKED_GROUP_LABEL =
|
|||||||
"was blocked because we are blocking all third-party storage access requests and " +
|
"was blocked because we are blocking all third-party storage access requests and " +
|
||||||
"content blocking is enabled.";
|
"content blocking is enabled.";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
UrlClassifierTestUtils.addTestTrackers();
|
UrlClassifierTestUtils.addTestTrackers();
|
||||||
registerCleanupFunction(function() {
|
registerCleanupFunction(function() {
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ const BLOCKED_URL =
|
|||||||
TRACKER_URL +
|
TRACKER_URL +
|
||||||
"browser/devtools/client/webconsole/test/browser/test-image.png";
|
"browser/devtools/client/webconsole/test/browser/test-image.png";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
UrlClassifierTestUtils.addTestTrackers();
|
UrlClassifierTestUtils.addTestTrackers();
|
||||||
registerCleanupFunction(function() {
|
registerCleanupFunction(function() {
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ const BLOCKED_URL =
|
|||||||
TRACKER_URL +
|
TRACKER_URL +
|
||||||
"browser/devtools/client/webconsole/test/browser/test-image.png";
|
"browser/devtools/client/webconsole/test/browser/test-image.png";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
UrlClassifierTestUtils.addTestTrackers();
|
UrlClassifierTestUtils.addTestTrackers();
|
||||||
registerCleanupFunction(function() {
|
registerCleanupFunction(function() {
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ const BLOCKED_URL =
|
|||||||
TRACKER_URL +
|
TRACKER_URL +
|
||||||
"browser/devtools/client/webconsole/test/browser/test-image.png";
|
"browser/devtools/client/webconsole/test/browser/test-image.png";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
UrlClassifierTestUtils.addTestTrackers();
|
UrlClassifierTestUtils.addTestTrackers();
|
||||||
registerCleanupFunction(function() {
|
registerCleanupFunction(function() {
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ const BLOCKED_URL =
|
|||||||
"browser/devtools/client/webconsole/test/browser/test-image.png";
|
"browser/devtools/client/webconsole/test/browser/test-image.png";
|
||||||
const WARNING_GROUP_PREF = "devtools.webconsole.groupWarningMessages";
|
const WARNING_GROUP_PREF = "devtools.webconsole.groupWarningMessages";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
UrlClassifierTestUtils.addTestTrackers();
|
UrlClassifierTestUtils.addTestTrackers();
|
||||||
registerCleanupFunction(function() {
|
registerCleanupFunction(function() {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
const BEHAVIOR_ACCEPT = Ci.nsICookieService.BEHAVIOR_ACCEPT;
|
const BEHAVIOR_ACCEPT = Ci.nsICookieService.BEHAVIOR_ACCEPT;
|
||||||
const BEHAVIOR_REJECT_TRACKER = Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER;
|
const BEHAVIOR_REJECT_TRACKER = Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER;
|
||||||
|
|
||||||
let { UrlClassifierTestUtils } = ChromeUtils.import(
|
let { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const TOP_DOMAIN = "http://mochi.test:8888/";
|
const TOP_DOMAIN = "http://mochi.test:8888/";
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||||||
GeckoViewUtils: "resource://gre/modules/GeckoViewUtils.sys.mjs",
|
GeckoViewUtils: "resource://gre/modules/GeckoViewUtils.sys.mjs",
|
||||||
RemoteSecuritySettings:
|
RemoteSecuritySettings:
|
||||||
"resource://gre/modules/psm/RemoteSecuritySettings.sys.mjs",
|
"resource://gre/modules/psm/RemoteSecuritySettings.sys.mjs",
|
||||||
|
SafeBrowsing: "resource://gre/modules/SafeBrowsing.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||||
Blocklist: "resource://gre/modules/Blocklist.jsm",
|
Blocklist: "resource://gre/modules/Blocklist.jsm",
|
||||||
HistogramStopwatch: "resource://gre/modules/GeckoViewTelemetry.jsm",
|
HistogramStopwatch: "resource://gre/modules/GeckoViewTelemetry.jsm",
|
||||||
InitializationTracker: "resource://gre/modules/GeckoViewTelemetry.jsm",
|
InitializationTracker: "resource://gre/modules/GeckoViewTelemetry.jsm",
|
||||||
SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(this, "WindowEventDispatcher", () =>
|
XPCOMUtils.defineLazyGetter(this, "WindowEventDispatcher", () =>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
const { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js");
|
const { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js");
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
function run_test() {
|
function run_test() {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
function run_test() {
|
function run_test() {
|
||||||
|
|||||||
@@ -276,8 +276,8 @@ TalosPowersService.prototype = {
|
|||||||
// We can wait for various startup items here to complete during
|
// We can wait for various startup items here to complete during
|
||||||
// the getInfo.html step for Talos so that subsequent runs don't
|
// the getInfo.html step for Talos so that subsequent runs don't
|
||||||
// have to do things like re-request the SafeBrowsing list.
|
// have to do things like re-request the SafeBrowsing list.
|
||||||
let { SafeBrowsing } = ChromeUtils.import(
|
let { SafeBrowsing } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/SafeBrowsing.jsm"
|
"resource://gre/modules/SafeBrowsing.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Speed things up in case nobody else called this:
|
// Speed things up in case nobody else called this:
|
||||||
|
|||||||
@@ -90,8 +90,8 @@ requestLongerTimeout = function AntiTrackingRequestLongerTimeout(factor) {
|
|||||||
|
|
||||||
requestLongerTimeout(3);
|
requestLongerTimeout(3);
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const { PermissionTestUtils } = ChromeUtils.importESModule(
|
const { PermissionTestUtils } = ChromeUtils.importESModule(
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ const FOREIGN_PAGE = "https://example.net";
|
|||||||
const FOREIGN_PAGE2 = "https://example.net^partitionKey=(https,example.com)";
|
const FOREIGN_PAGE2 = "https://example.net^partitionKey=(https,example.com)";
|
||||||
const FOREIGN_PAGE3 = "https://example.net^partitionKey=(https,example.org)";
|
const FOREIGN_PAGE3 = "https://example.net^partitionKey=(https,example.org)";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
const { SiteDataTestUtils } = ChromeUtils.import(
|
const { SiteDataTestUtils } = ChromeUtils.import(
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
"resource://testing-common/SiteDataTestUtils.jsm"
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
const TRACKING_PAGE = "https://tracking.example.org";
|
const TRACKING_PAGE = "https://tracking.example.org";
|
||||||
const BENIGN_PAGE = "https://example.com";
|
const BENIGN_PAGE = "https://example.com";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
const { SiteDataTestUtils } = ChromeUtils.import(
|
const { SiteDataTestUtils } = ChromeUtils.import(
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
"resource://testing-common/SiteDataTestUtils.jsm"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
/* vim: set sts=2 sw=2 et tw=80: */
|
/* vim: set sts=2 sw=2 et tw=80: */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Value for network.cookie.cookieBehavior to reject all third-party cookies.
|
// Value for network.cookie.cookieBehavior to reject all third-party cookies.
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["SafeBrowsing"];
|
|
||||||
|
|
||||||
const PREF_DEBUG_ENABLED = "browser.safebrowsing.debug";
|
const PREF_DEBUG_ENABLED = "browser.safebrowsing.debug";
|
||||||
let loggingEnabled = false;
|
let loggingEnabled = false;
|
||||||
|
|
||||||
@@ -297,7 +295,7 @@ const FEATURES = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
var SafeBrowsing = {
|
export var SafeBrowsing = {
|
||||||
init() {
|
init() {
|
||||||
if (this.initialized) {
|
if (this.initialized) {
|
||||||
log("Already initialized");
|
log("Already initialized");
|
||||||
@@ -12,9 +12,8 @@ const PARTIAL_LENGTH = 4;
|
|||||||
const MIN_WAIT_DURATION_MAX_VALUE = 24 * 60 * 60 * 1000;
|
const MIN_WAIT_DURATION_MAX_VALUE = 24 * 60 * 60 * 1000;
|
||||||
const PREF_DEBUG_ENABLED = "browser.safebrowsing.debug";
|
const PREF_DEBUG_ENABLED = "browser.safebrowsing.debug";
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
@@ -170,7 +169,7 @@ FullHashMatch.prototype = {
|
|||||||
cacheDuration: null,
|
cacheDuration: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
function HashCompleter() {
|
export function HashCompleter() {
|
||||||
// The current HashCompleterRequest in flight. Once it is started, it is set
|
// The current HashCompleterRequest in flight. Once it is started, it is set
|
||||||
// to null. It may be used by multiple calls to |complete| in succession to
|
// to null. It may be used by multiple calls to |complete| in succession to
|
||||||
// avoid creating multiple requests to the same gethash URL.
|
// avoid creating multiple requests to the same gethash URL.
|
||||||
@@ -965,5 +964,3 @@ function errorWithStack() {
|
|||||||
err.value = Cr.NS_ERROR_FAILURE;
|
err.value = Cr.NS_ERROR_FAILURE;
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["HashCompleter"];
|
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
const PREF_DISABLE_TEST_BACKOFF =
|
const PREF_DISABLE_TEST_BACKOFF =
|
||||||
"browser.safebrowsing.provider.test.disableBackoff";
|
"browser.safebrowsing.provider.test.disableBackoff";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Partially applies a function to a particular "this object" and zero or
|
* Partially applies a function to a particular "this object" and zero or
|
||||||
* more arguments. The result is a new function with some arguments of the first
|
* more arguments. The result is a new function with some arguments of the first
|
||||||
@@ -28,7 +29,7 @@ const PREF_DISABLE_TEST_BACKOFF =
|
|||||||
*
|
*
|
||||||
* @returns {function} A partially-applied form of the speficied function.
|
* @returns {function} A partially-applied form of the speficied function.
|
||||||
*/
|
*/
|
||||||
function BindToObject(fn, self, opt_args) {
|
export function BindToObject(fn, self, opt_args) {
|
||||||
var boundargs = fn.boundArgs_ || [];
|
var boundargs = fn.boundArgs_ || [];
|
||||||
boundargs = boundargs.concat(
|
boundargs = boundargs.concat(
|
||||||
Array.prototype.slice.call(arguments, 2, arguments.length)
|
Array.prototype.slice.call(arguments, 2, arguments.length)
|
||||||
@@ -215,13 +216,12 @@ function RequestBackoffV4(maxRequests, requestPeriod, provider = null) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function UrlClassifierLib() {
|
export function UrlClassifierLib() {
|
||||||
this.wrappedJSObject = {
|
this.wrappedJSObject = {
|
||||||
RequestBackoff,
|
RequestBackoff,
|
||||||
RequestBackoffV4,
|
RequestBackoffV4,
|
||||||
BindToObject,
|
BindToObject,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
UrlClassifierLib.prototype.QueryInterface = ChromeUtils.generateQI([]);
|
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["UrlClassifierLib", "BindToObject"];
|
UrlClassifierLib.prototype.QueryInterface = ChromeUtils.generateQI([]);
|
||||||
@@ -2,9 +2,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
// This is the only implementation of nsIUrlListManager.
|
// This is the only implementation of nsIUrlListManager.
|
||||||
// A class that manages lists, namely exception and block lists for
|
// A class that manages lists, namely exception and block lists for
|
||||||
@@ -844,7 +842,7 @@ function Init() {
|
|||||||
initialized = true;
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function RegistrationData() {
|
export function RegistrationData() {
|
||||||
Init();
|
Init();
|
||||||
return new PROT_ListManager();
|
return new PROT_ListManager();
|
||||||
}
|
}
|
||||||
@@ -857,5 +855,3 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||||||
PREF_TEST_NOTIFICATIONS,
|
PREF_TEST_NOTIFICATIONS,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["RegistrationData"];
|
|
||||||
@@ -10,9 +10,9 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
const COLLECTION_NAME = "tracking-protection-lists";
|
const COLLECTION_NAME = "tracking-protection-lists";
|
||||||
|
|
||||||
// SafeBrowsing protocol parameters.
|
// SafeBrowsing protocol parameters.
|
||||||
const SBRS_UPDATE_MINIMUM_DELAY = 21600; // Minimum delay before polling again in seconds
|
export const SBRS_UPDATE_MINIMUM_DELAY = 21600; // Minimum delay before polling again in seconds
|
||||||
|
|
||||||
function UrlClassifierRemoteSettingsService() {}
|
export function UrlClassifierRemoteSettingsService() {}
|
||||||
UrlClassifierRemoteSettingsService.prototype = {
|
UrlClassifierRemoteSettingsService.prototype = {
|
||||||
classID: Components.ID("{1980624c-c50b-4b46-a91c-dfaba7792706}"),
|
classID: Components.ID("{1980624c-c50b-4b46-a91c-dfaba7792706}"),
|
||||||
QueryInterface: ChromeUtils.generateQI([
|
QueryInterface: ChromeUtils.generateQI([
|
||||||
@@ -136,8 +136,3 @@ UrlClassifierRemoteSettingsService.prototype = {
|
|||||||
this._entries = {};
|
this._entries = {};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const EXPORTED_SYMBOLS = [
|
|
||||||
"UrlClassifierRemoteSettingsService",
|
|
||||||
"SBRS_UPDATE_MINIMUM_DELAY",
|
|
||||||
];
|
|
||||||
@@ -8,25 +8,25 @@ Classes = [
|
|||||||
{
|
{
|
||||||
'cid': '{26a4a019-2827-4a89-a85c-5931a678823a}',
|
'cid': '{26a4a019-2827-4a89-a85c-5931a678823a}',
|
||||||
'contract_ids': ['@mozilla.org/url-classifier/jslib;1'],
|
'contract_ids': ['@mozilla.org/url-classifier/jslib;1'],
|
||||||
'jsm': 'resource://gre/modules/UrlClassifierLib.jsm',
|
'esModule': 'resource://gre/modules/UrlClassifierLib.sys.mjs',
|
||||||
'constructor': 'UrlClassifierLib',
|
'constructor': 'UrlClassifierLib',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'cid': '{ca168834-cc00-48f9-b83c-fd018e58cae3}',
|
'cid': '{ca168834-cc00-48f9-b83c-fd018e58cae3}',
|
||||||
'contract_ids': ['@mozilla.org/url-classifier/listmanager;1'],
|
'contract_ids': ['@mozilla.org/url-classifier/listmanager;1'],
|
||||||
'jsm': 'resource://gre/modules/UrlClassifierListManager.jsm',
|
'esModule': 'resource://gre/modules/UrlClassifierListManager.sys.mjs',
|
||||||
'constructor': 'RegistrationData',
|
'constructor': 'RegistrationData',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'cid': '{9111de73-9322-4bfc-8b65-2b727f3e6ec8}',
|
'cid': '{9111de73-9322-4bfc-8b65-2b727f3e6ec8}',
|
||||||
'contract_ids': ['@mozilla.org/url-classifier/hashcompleter;1'],
|
'contract_ids': ['@mozilla.org/url-classifier/hashcompleter;1'],
|
||||||
'jsm': 'resource://gre/modules/UrlClassifierHashCompleter.jsm',
|
'esModule': 'resource://gre/modules/UrlClassifierHashCompleter.sys.mjs',
|
||||||
'constructor': 'HashCompleter',
|
'constructor': 'HashCompleter',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'cid': '{1980624c-c50b-4b46-a91c-dfaba7792706}',
|
'cid': '{1980624c-c50b-4b46-a91c-dfaba7792706}',
|
||||||
'contract_ids': ['@mozilla.org/url-classifier/list-service;1'],
|
'contract_ids': ['@mozilla.org/url-classifier/list-service;1'],
|
||||||
'jsm': 'resource://gre/modules/UrlClassifierRemoteSettingsService.jsm',
|
'esModule': 'resource://gre/modules/UrlClassifierRemoteSettingsService.sys.mjs',
|
||||||
'constructor': 'UrlClassifierRemoteSettingsService',
|
'constructor': 'UrlClassifierRemoteSettingsService',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -55,11 +55,11 @@ SOURCES += [
|
|||||||
]
|
]
|
||||||
|
|
||||||
EXTRA_JS_MODULES += [
|
EXTRA_JS_MODULES += [
|
||||||
"SafeBrowsing.jsm",
|
"SafeBrowsing.sys.mjs",
|
||||||
"UrlClassifierHashCompleter.jsm",
|
"UrlClassifierHashCompleter.sys.mjs",
|
||||||
"UrlClassifierLib.jsm",
|
"UrlClassifierLib.sys.mjs",
|
||||||
"UrlClassifierListManager.jsm",
|
"UrlClassifierListManager.sys.mjs",
|
||||||
"UrlClassifierRemoteSettingsService.jsm",
|
"UrlClassifierRemoteSettingsService.sys.mjs",
|
||||||
]
|
]
|
||||||
|
|
||||||
XPCOM_MANIFESTS += [
|
XPCOM_MANIFESTS += [
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
"use strict";
|
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["UrlClassifierTestUtils"];
|
|
||||||
|
|
||||||
const ANNOTATION_TABLE_NAME = "mochitest1-track-simple";
|
const ANNOTATION_TABLE_NAME = "mochitest1-track-simple";
|
||||||
const ANNOTATION_TABLE_PREF = "urlclassifier.trackingAnnotationTable";
|
const ANNOTATION_TABLE_PREF = "urlclassifier.trackingAnnotationTable";
|
||||||
const ANNOTATION_ENTITYLIST_TABLE_NAME = "mochitest1-trackwhite-simple";
|
const ANNOTATION_ENTITYLIST_TABLE_NAME = "mochitest1-trackwhite-simple";
|
||||||
@@ -25,7 +21,7 @@ const EMAIL_TRACKING_TABLE_PREF =
|
|||||||
|
|
||||||
let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||||
|
|
||||||
var UrlClassifierTestUtils = {
|
export var UrlClassifierTestUtils = {
|
||||||
addTestTrackers() {
|
addTestTrackers() {
|
||||||
// Add some URLs to the tracking databases
|
// Add some URLs to the tracking databases
|
||||||
let annotationURL1 = "tracking.example.org/"; // only for annotations
|
let annotationURL1 = "tracking.example.org/"; // only for annotations
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
let { UrlClassifierTestUtils } = ChromeUtils.import(
|
let { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const TEST_DOMAIN = "https://example.com/";
|
const TEST_DOMAIN = "https://example.com/";
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ XPCSHELL_TESTS_MANIFESTS += ["unit/xpcshell.ini"]
|
|||||||
BROWSER_CHROME_MANIFESTS += ["browser/browser.ini"]
|
BROWSER_CHROME_MANIFESTS += ["browser/browser.ini"]
|
||||||
|
|
||||||
TESTING_JS_MODULES += [
|
TESTING_JS_MODULES += [
|
||||||
"UrlClassifierTestUtils.jsm",
|
"UrlClassifierTestUtils.sys.mjs",
|
||||||
]
|
]
|
||||||
|
|
||||||
if CONFIG["ENABLE_TESTS"]:
|
if CONFIG["ENABLE_TESTS"]:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
const { SafeBrowsing } = ChromeUtils.import(
|
const { SafeBrowsing } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/SafeBrowsing.jsm"
|
"resource://gre/modules/SafeBrowsing.sys.mjs"
|
||||||
);
|
);
|
||||||
const { updateAppInfo } = ChromeUtils.importESModule(
|
const { updateAppInfo } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/AppInfo.sys.mjs"
|
"resource://testing-common/AppInfo.sys.mjs"
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
var httpserver = new HttpServer();
|
var httpserver = new HttpServer();
|
||||||
|
|
||||||
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const FEATURE_STP_PREF = "privacy.trackingprotection.socialtracking.enabled";
|
const FEATURE_STP_PREF = "privacy.trackingprotection.socialtracking.enabled";
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
const { RemoteSettings } = ChromeUtils.importESModule(
|
const { RemoteSettings } = ChromeUtils.importESModule(
|
||||||
"resource://services-settings/remote-settings.sys.mjs"
|
"resource://services-settings/remote-settings.sys.mjs"
|
||||||
);
|
);
|
||||||
const { SBRS_UPDATE_MINIMUM_DELAY } = ChromeUtils.import(
|
const { SBRS_UPDATE_MINIMUM_DELAY } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/UrlClassifierRemoteSettingsService.jsm"
|
"resource://gre/modules/UrlClassifierRemoteSettingsService.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const COLLECTION_NAME = "tracking-protection-lists";
|
const COLLECTION_NAME = "tracking-protection-lists";
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||||
const { UrlClassifierTestUtils } = ChromeUtils.import(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.jsm"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const defaultTopWindowURI = NetUtil.newURI("http://www.example.com/");
|
const defaultTopWindowURI = NetUtil.newURI("http://www.example.com/");
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ avoid-blacklist-and-whitelist:
|
|||||||
- toolkit/components/satchel/test/test_form_autocomplete.html
|
- toolkit/components/satchel/test/test_form_autocomplete.html
|
||||||
- toolkit/components/telemetry/docs/data/environment.rst
|
- toolkit/components/telemetry/docs/data/environment.rst
|
||||||
- toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
|
- toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
|
||||||
- toolkit/components/url-classifier/SafeBrowsing.jsm
|
- toolkit/components/url-classifier/SafeBrowsing.sys.mjs
|
||||||
- toolkit/components/url-classifier/tests/mochitest/features.js
|
- toolkit/components/url-classifier/tests/mochitest/features.js
|
||||||
- toolkit/components/url-classifier/tests/mochitest/good.js
|
- toolkit/components/url-classifier/tests/mochitest/good.js
|
||||||
- toolkit/components/url-classifier/tests/mochitest/test_annotation_vs_TP.html
|
- toolkit/components/url-classifier/tests/mochitest/test_annotation_vs_TP.html
|
||||||
@@ -264,7 +264,7 @@ avoid-blacklist-and-whitelist:
|
|||||||
- toolkit/components/url-classifier/tests/unit/head_urlclassifier.js
|
- toolkit/components/url-classifier/tests/unit/head_urlclassifier.js
|
||||||
- toolkit/components/url-classifier/tests/unit/test_digest256.js
|
- toolkit/components/url-classifier/tests/unit/test_digest256.js
|
||||||
- toolkit/components/url-classifier/tests/unit/test_platform_specific_threats.js
|
- toolkit/components/url-classifier/tests/unit/test_platform_specific_threats.js
|
||||||
- toolkit/components/url-classifier/tests/UrlClassifierTestUtils.jsm
|
- toolkit/components/url-classifier/tests/UrlClassifierTestUtils.sys.mjs
|
||||||
- toolkit/content/aboutTelemetry.js
|
- toolkit/content/aboutTelemetry.js
|
||||||
- toolkit/content/tests/browser/browser_delay_autoplay_webAudio.js
|
- toolkit/content/tests/browser/browser_delay_autoplay_webAudio.js
|
||||||
- toolkit/modules/PermissionsUtils.sys.mjs
|
- toolkit/modules/PermissionsUtils.sys.mjs
|
||||||
|
|||||||
Reference in New Issue
Block a user