Bug 1885723 - Fix more jsm references in misc code. r=Gijs,necko-reviewers,dom-storage-reviewers,janv,kershaw

Differential Revision: https://phabricator.services.mozilla.com/D204845
This commit is contained in:
Mark Banner 2024-03-19 08:59:11 +00:00
Родитель 7e23645488
Коммит 268dc80fa1
12 изменённых файлов: 17 добавлений и 16 удалений

Просмотреть файл

@ -644,7 +644,7 @@ var SpecialPowers = {
clearUserPref(prefName) {
Services.prefs.clearUserPref(prefName);
},
// Copied (and slightly adjusted) from testing/specialpowers/content/SpecialPowersAPI.jsm
// Copied (and slightly adjusted) from testing/specialpowers/api.js
exactGC(callback) {
let count = 0;

Просмотреть файл

@ -4,9 +4,9 @@ const url = SimpleTest.getTestFileURL("mockpushserviceparent.js");
const chromeScript = SpecialPowers.loadChromeScript(url);
/**
* Replaces `PushService.jsm` with a mock implementation that handles requests
* Replaces `PushService.sys.mjs` with a mock implementation that handles requests
* from the DOM API. This allows tests to simulate local errors and error
* reporting, bypassing the `PushService.jsm` machinery.
* reporting, bypassing the `PushService.sys.mjs` machinery.
*/
async function replacePushService(mockService) {
chromeScript.addMessageListener("service-delivery-error", function (msg) {
@ -58,7 +58,7 @@ let currentMockSocket = null;
/**
* Sets up a mock connection for the WebSocket backend. This only replaces
* the transport layer; `PushService.jsm` still handles DOM API requests,
* the transport layer; `PushService.sys.mjs` still handles DOM API requests,
* observes permission changes, writes to IndexedDB, and notifies service
* workers of incoming push messages.
*/

Просмотреть файл

@ -1,5 +1,4 @@
function run_test() {
// Hack around Promise.jsm being stuck on my global
Assert.equal(false, PromiseDebugging === undefined);
var res;
var p = new Promise(function (resolve) {

Просмотреть файл

@ -5,7 +5,7 @@
import { LangPackMatcher } from "resource://gre/modules/LangPackMatcher.sys.mjs";
/**
* LangPackMatcher.jsm calls out to to the addons store, which involves network requests.
* LangPackMatcher.sys.mjs calls out to to the addons store, which involves network requests.
* Other tests create a fake addons server, and install mock XPIs. At the time of this
* writing that infrastructure is not available for mochitests.
*
@ -26,7 +26,7 @@ import { LangPackMatcher } from "resource://gre/modules/LangPackMatcher.sys.mjs"
export function getAddonAndLocalAPIsMocker(testScope, sandbox) {
const { info } = testScope;
return function mockAddonAndLocaleAPIs({ systemLocale, appLocale }) {
info("Mocking LangPackMatcher.jsm APIs");
info("Mocking LangPackMatcher.sys.mjs APIs");
let resolveLangPacks;
const langPackPromise = new Promise(resolve => {

Просмотреть файл

@ -765,7 +765,7 @@ video > .caption-box {
* The pseudo element won't inherit CSS styles from its direct parent, `::cue`
* would actually inherit styles from video because it's video's pseudo element.
* Therefore, we have to explicitly set some styles which are already defined
* in its parent element in vtt.jsm.
* in its parent element in vtt.sys.mjs.
*/
::cue {
color: rgba(255, 255, 255, 1);

Просмотреть файл

@ -80,7 +80,7 @@ bool SVGContextPaint::IsAllowedForImageFromURI(nsIURI* aURI) {
// Only allowed for extensions that have the
// internal:svgContextPropertiesAllowed permission (added internally from
// to Mozilla-owned extensions, see `isMozillaExtension` function
// defined in Extension.jsm for the exact criteria).
// defined in Extension.sys.mjs for the exact criteria).
return addonPolicy->HasPermission(
nsGkAtoms::svgContextPropertiesAllowedPermission);
}

Просмотреть файл

@ -1423,7 +1423,9 @@ function RecordResult(testRunTime, errorMsg, typeSpecificResults) {
// branch, 'equal' must be false so let's assert that to guard
// against logic errors.
if (equal) {
throw new Error("Logic error in reftest.jsm fuzzy test handling!");
throw new Error(
"Logic error in reftest.sys.mjs fuzzy test handling!"
);
}
output = { s: ["PASS", "FAIL"], n: "UnexpectedPass" };
} else {

Просмотреть файл

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* This file tests the methods on NetUtil.jsm.
* This file tests the methods on NetUtil.sys.mjs.
*/
"use strict";

Просмотреть файл

@ -450,7 +450,7 @@ class IntermediatePreloads {
try {
// split off the header and footer
certBase64 = dataAsString.split("-----")[2].replace(/\s/g, "");
// get an array of bytes so we can use X509.jsm
// get an array of bytes so we can use X509.sys.mjs
let certBytes = stringToBytes(atob(certBase64));
let cert = new X509.Certificate();
cert.parse(certBytes);

Просмотреть файл

@ -3,9 +3,9 @@
"use strict";
// Tests DER.jsm functionality.
// Tests DER.sys.mjs functionality.
// Until DER.jsm is actually used in production code, this is where we have to
// Until DER.sys.mjs is actually used in production code, this is where we have to
// import it from.
var { DER } = ChromeUtils.importESModule(
"resource://gre/modules/psm/DER.sys.mjs"

Просмотреть файл

@ -3,7 +3,7 @@
"use strict";
// Tests X509.jsm functionality.
// Tests X509.sys.mjs functionality.
function stringToArray(s) {
let b = [];

Просмотреть файл

@ -336,7 +336,7 @@ skip-if = ["condprof"] # Bug 1769154 - as designed
["test_sss_sanitizeOnShutdown.js"]
firefox-appdir = "browser"
# Sanitization works differently on Android - this doesn't apply.
# browser/modules/Sanitizer.jsm used by the test isn't available in Thunderbird.
# browser/modules/Sanitizer.sys.mjs used by the test isn't available in Thunderbird.
skip-if = [
"os == 'android'",
"appname == 'thunderbird'"