From 5cdece69e06542e086ca01fa9af5b72df372ed5b Mon Sep 17 00:00:00 2001 From: Ping Chen Date: Thu, 10 Jun 2021 01:14:02 +0000 Subject: [PATCH] Bug 1696626 - Move ldap/xpcom/tests to mailnews/addrbook/test and run against JS implementation. r=darktrojan Differential Revision: https://phabricator.services.mozilla.com/D117143 --HG-- rename : ldap/xpcom/tests/unit/test_ldapquery.js => mailnews/addrbook/test/unit/test_ldapquery.js rename : ldap/xpcom/tests/unit/test_nsLDAPSyncQuery.js => mailnews/addrbook/test/unit/test_nsLDAPSyncQuery.js rename : ldap/xpcom/tests/unit/test_nsLDAPURL.js => mailnews/addrbook/test/unit/test_nsLDAPURL.js --- ldap/xpcom/moz.build | 2 -- ldap/xpcom/tests/moz.build | 6 ------ ldap/xpcom/tests/unit/xpcshell.ini | 7 ------- .../addrbook/test}/unit/test_ldapquery.js | 2 +- .../addrbook/test}/unit/test_nsLDAPSyncQuery.js | 2 +- .../addrbook/test}/unit/test_nsLDAPURL.js | 0 mailnews/addrbook/test/unit/xpcshell.ini | 1 + mailnews/addrbook/test/unit/xpcshell_ldap.ini | 2 ++ 8 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 ldap/xpcom/tests/moz.build delete mode 100644 ldap/xpcom/tests/unit/xpcshell.ini rename {ldap/xpcom/tests => mailnews/addrbook/test}/unit/test_ldapquery.js (98%) rename {ldap/xpcom/tests => mailnews/addrbook/test}/unit/test_nsLDAPSyncQuery.js (95%) rename {ldap/xpcom/tests => mailnews/addrbook/test}/unit/test_nsLDAPURL.js (100%) diff --git a/ldap/xpcom/moz.build b/ldap/xpcom/moz.build index 997864ab04..9c83c154c7 100644 --- a/ldap/xpcom/moz.build +++ b/ldap/xpcom/moz.build @@ -7,5 +7,3 @@ DIRS += [ "public", "src", ] - -TEST_DIRS += ["tests"] diff --git a/ldap/xpcom/tests/moz.build b/ldap/xpcom/tests/moz.build deleted file mode 100644 index 6b37fdbe09..0000000000 --- a/ldap/xpcom/tests/moz.build +++ /dev/null @@ -1,6 +0,0 @@ -# vim: set filetype=python: -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - -XPCSHELL_TESTS_MANIFESTS += ["unit/xpcshell.ini"] diff --git a/ldap/xpcom/tests/unit/xpcshell.ini b/ldap/xpcom/tests/unit/xpcshell.ini deleted file mode 100644 index 6494dbbd94..0000000000 --- a/ldap/xpcom/tests/unit/xpcshell.ini +++ /dev/null @@ -1,7 +0,0 @@ -[DEFAULT] -head = -tail = - -[test_nsLDAPURL.js] -[test_nsLDAPSyncQuery.js] -[test_ldapquery.js] diff --git a/ldap/xpcom/tests/unit/test_ldapquery.js b/mailnews/addrbook/test/unit/test_ldapquery.js similarity index 98% rename from ldap/xpcom/tests/unit/test_ldapquery.js rename to mailnews/addrbook/test/unit/test_ldapquery.js index 555bcdfd9d..02f022b5c4 100644 --- a/ldap/xpcom/tests/unit/test_ldapquery.js +++ b/mailnews/addrbook/test/unit/test_ldapquery.js @@ -13,7 +13,7 @@ const { LDAPDaemon, LDAPHandlerFn } = ChromeUtils.import( const { BinaryServer } = ChromeUtils.import( "resource://testing-common/mailnews/Binaryd.jsm" ); -const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); +var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); /** * Adaptor class to implement nsILDAPMessageListener with a promise. diff --git a/ldap/xpcom/tests/unit/test_nsLDAPSyncQuery.js b/mailnews/addrbook/test/unit/test_nsLDAPSyncQuery.js similarity index 95% rename from ldap/xpcom/tests/unit/test_nsLDAPSyncQuery.js rename to mailnews/addrbook/test/unit/test_nsLDAPSyncQuery.js index 778505bf5a..3e507b05f9 100644 --- a/ldap/xpcom/tests/unit/test_nsLDAPSyncQuery.js +++ b/mailnews/addrbook/test/unit/test_nsLDAPSyncQuery.js @@ -10,7 +10,7 @@ const { LDAPDaemon, LDAPHandlerFn } = ChromeUtils.import( const { BinaryServer } = ChromeUtils.import( "resource://testing-common/mailnews/Binaryd.jsm" ); -const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); +var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); const nsILDAPSyncQuery = Ci.nsILDAPSyncQuery; const LDAPSyncQueryContractID = "@mozilla.org/ldapsyncquery;1"; diff --git a/ldap/xpcom/tests/unit/test_nsLDAPURL.js b/mailnews/addrbook/test/unit/test_nsLDAPURL.js similarity index 100% rename from ldap/xpcom/tests/unit/test_nsLDAPURL.js rename to mailnews/addrbook/test/unit/test_nsLDAPURL.js diff --git a/mailnews/addrbook/test/unit/xpcshell.ini b/mailnews/addrbook/test/unit/xpcshell.ini index fc90eb5894..f9523cbad9 100644 --- a/mailnews/addrbook/test/unit/xpcshell.ini +++ b/mailnews/addrbook/test/unit/xpcshell.ini @@ -45,3 +45,4 @@ tags = vcard tags = vcard [include:xpcshell_ldap.ini] +[test_nsLDAPURL.js] diff --git a/mailnews/addrbook/test/unit/xpcshell_ldap.ini b/mailnews/addrbook/test/unit/xpcshell_ldap.ini index c77fc303b9..ab2d275b84 100644 --- a/mailnews/addrbook/test/unit/xpcshell_ldap.ini +++ b/mailnews/addrbook/test/unit/xpcshell_ldap.ini @@ -1,5 +1,7 @@ [test_ldap1.js] [test_ldap2.js] [test_ldapOffline.js] +[test_ldapquery.js] [test_ldapReplication.js] skip-if = debug # Fails for unknown reasons. +[test_nsLDAPSyncQuery.js]