Bug 1870187 - ESMify Ldapd.jsm and Binaryd.jsm. r=mkmelin

Depends on D196523

Differential Revision: https://phabricator.services.mozilla.com/D196524

--HG--
rename : mailnews/test/fakeserver/Binaryd.jsm => mailnews/test/fakeserver/Binaryd.sys.mjs
rename : mailnews/test/fakeserver/Ldapd.jsm => mailnews/test/fakeserver/Ldapd.sys.mjs
extra : moz-landing-system : lando
This commit is contained in:
Geoff Lankow 2023-12-18 23:09:28 +00:00
Родитель c2c3c0f05f
Коммит 7fc2f09755
6 изменённых файлов: 13 добавлений и 19 удалений

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

@ -4,11 +4,11 @@
* Test suite for nsILDAPSyncQuery.
*/
const { LDAPDaemon, LDAPHandlerFn } = ChromeUtils.import(
"resource://testing-common/mailnews/Ldapd.jsm"
const { LDAPDaemon, LDAPHandlerFn } = ChromeUtils.importESModule(
"resource://testing-common/mailnews/Ldapd.sys.mjs"
);
const { BinaryServer } = ChromeUtils.import(
"resource://testing-common/mailnews/Binaryd.jsm"
const { BinaryServer } = ChromeUtils.importESModule(
"resource://testing-common/mailnews/Binaryd.sys.mjs"
);
function getLDAPAttributes(urlSpec) {

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

@ -7,11 +7,11 @@
* Test basic LDAP querying.
*/
const { LDAPDaemon, LDAPHandlerFn } = ChromeUtils.import(
"resource://testing-common/mailnews/Ldapd.jsm"
const { LDAPDaemon, LDAPHandlerFn } = ChromeUtils.importESModule(
"resource://testing-common/mailnews/Ldapd.sys.mjs"
);
const { BinaryServer } = ChromeUtils.import(
"resource://testing-common/mailnews/Binaryd.jsm"
const { BinaryServer } = ChromeUtils.importESModule(
"resource://testing-common/mailnews/Binaryd.sys.mjs"
);
/**

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

@ -52,9 +52,9 @@ JAR_MANIFESTS += ["jar.mn"]
TESTING_JS_MODULES.mailnews += [
"test/fakeserver/Auth.sys.mjs",
"test/fakeserver/Binaryd.jsm",
"test/fakeserver/Binaryd.sys.mjs",
"test/fakeserver/Imapd.sys.mjs",
"test/fakeserver/Ldapd.jsm",
"test/fakeserver/Ldapd.sys.mjs",
"test/fakeserver/Maild.sys.mjs",
"test/fakeserver/Nntpd.sys.mjs",
"test/fakeserver/Pop3d.sys.mjs",

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

@ -3,8 +3,6 @@
* 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 EXPORTED_SYMBOLS = ["BinaryServer"];
const CC = Components.Constructor;
const ServerSocket = CC(
@ -42,7 +40,7 @@ const BinaryOutputStream = CC(
*
*/
class BinaryServer {
export class BinaryServer {
/**
* The handler function should be of the form:
* async function handlerFn(conn, daemon)

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

@ -3,8 +3,6 @@
* 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 EXPORTED_SYMBOLS = ["LDAPDaemon", "LDAPHandlerFn"];
var { MailStringUtils } = ChromeUtils.import(
"resource:///modules/MailStringUtils.jsm"
);
@ -377,7 +375,7 @@ class BERParser {
* So tests can set up test data here, shared by any number of LDAPHandlerFn
* connections.
*/
class LDAPDaemon {
export class LDAPDaemon {
constructor() {
// An entry is an object of the form:
// {dn:"....", attributes: {attr1: [val1], attr2:[val2,val3], ...}}
@ -662,7 +660,7 @@ class LDAPHandler {
/**
* Handler function to deal with a connection to our LDAP server.
*/
async function LDAPHandlerFn(conn, daemon) {
export async function LDAPHandlerFn(conn, daemon) {
const handler = new LDAPHandler(conn, daemon);
await handler.run();
}

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

@ -393,9 +393,7 @@
"resource://testing-common/gloda/GlodaQueryHelper.jsm": "comm/mailnews/db/gloda/test/unit/resources/GlodaQueryHelper.jsm",
"resource://testing-common/gloda/GlodaTestHelper.jsm": "comm/mailnews/db/gloda/test/unit/resources/GlodaTestHelper.jsm",
"resource://testing-common/gloda/GlodaTestHelperFunctions.jsm": "comm/mailnews/db/gloda/test/unit/resources/GlodaTestHelperFunctions.jsm",
"resource://testing-common/mailnews/Binaryd.jsm": "comm/mailnews/test/fakeserver/Binaryd.jsm",
"resource://testing-common/mailnews/IMAPpump.jsm": "comm/mailnews/test/resources/IMAPpump.jsm",
"resource://testing-common/mailnews/Ldapd.jsm": "comm/mailnews/test/fakeserver/Ldapd.jsm",
"resource://testing-common/mailnews/LocalAccountUtils.jsm": "comm/mailnews/test/resources/LocalAccountUtils.jsm",
"resource://testing-common/mailnews/MailTestUtils.jsm": "comm/mailnews/test/resources/MailTestUtils.jsm",
"resource://testing-common/mailnews/MessageGenerator.jsm": "comm/mailnews/test/resources/MessageGenerator.jsm",