Name Description Size
.eslintrc.js 112
abSetup.js Sets up the directory service provider to return the app dir as the profile directory for the address book to use for locating its files during the tests. Note there are further configuration setup items below this. 2415
alertTestUtils.js This file provides support for writing mailnews tests that require hooking into the alerts system. Normally these tests would require a UI and fail in debug mode, but with this method you can hook into the alerts system and avoid the UI. This file registers prompts for nsIWindowWatcher::getNewPrompter and also registers a nsIPromptService service. nsIWindowWatcher::getNewAuthPrompter is also implemented but returns the nsILoginManagerPrompter as this would be expected when running mailnews. To register the system: function run_test() { registerAlertTestUtils(); // ... } You can then hook into the alerts just by defining a function of the same name as the interface function: function alert(aDialogTitle, aText) { // do my check } Interface functions that do not have equivalent functions defined and get called will be treated as unexpected, and therefore they will call do_throw(). 12062
filterTestUtils.js Creates a filter and appends it to the nsIMsgFilterList. @param {nsIMsgFilter} list - An nsIMsgFilter to which the new filter will be appended. @param {string} trigger - A key of ATTRIB_MAP that represents the filter trigger. @param {string} value - The value of the filter trigger. @param {nsMsgFilterAction} action - A key of ACTION_MAP that represents the action to be taken. 3117
folderEventLogHelper.js 0
HttpsProxy.sys.mjs A proxy to convert HTTP requests to HTTPS for tests. 4901
IMAPpump.sys.mjs This file provides a simple interface to the imap fake server. Demonstration of its use can be found in test_imapPump.js The code that forms the core of this file, in its original incarnation, was test_imapFolderCopy.js There have been several iterations since then. 4811
LocalAccountUtils.sys.mjs Create an nsIMsgIncomingServer and an nsIMsgAccount to go with it. @param {string} aType - The type of the server (pop3, imap etc). @param {integer} aPort - The port the server is on. @param {string} aUsername - The username for the server. @param {string} aPassword - The password for the server. @param {string} aHostname - The hostname for the server (defaults to localhost). @returns {nsIMsgIncomingServer} The newly-created nsIMsgIncomingServer. 7534
logHelper.js Makes everything awesome if you are Andrew. Some day it will make everything awesome if you are not awesome too. Right now the most meaningful thing to know is that if XPCOM failures happen (and get reported to the error console), this will induce a unit test failure. You should think this is awesome no matter whether you are Andrew or not. 17031
mailShutdown.js Provides methods to make sure our test shuts down mailnews properly. 1918
MailTestUtils.sys.mjs Returns the file system a particular file is on. Currently supported on Windows only. @param {nsIFile} aFile - The file to get the file system for. @returns {string} The file system a particular file is on, or 'null' if not on Windows. 20772
MessageGenerator.sys.mjs A list of first names for use by MessageGenerator to create deterministic, reversible names. To keep things easily reversible, if you add names, make sure they have no spaces in them! 51375
MessageInjection.sys.mjs Handling for Messages in Folders. Usage of either `local` or `imap`. Beware: Currently only one active instance of MessageInjection is supported due to a dependency on retrieving an account in the constructor. 36935
msgFolderListenerSetup.js globals mailTestUtils 14131
NetworkTestUtils.sys.mjs This file provides utilities useful in testing more advanced networking scenarios, such as proxies and SSL connections. 9650
OAuth2TestUtils.sys.mjs Utils for testing interactions with OAuth2 authentication servers. 10174
passwordStorage.js globals gDEPTH 806
POP3pump.js This routine will allow the easy processing of messages through the fake POP3 server into the local folder. It uses a single global defined as: gPOP3Pump: the main access to the routine gPOP3Pump.run() function to run to load the messages. Returns promise that resolves when done. gPOP3Pump.files: (in) an array of message files to load gPOP3Pump.onDone: function to execute after completion (optional and deprecated) gPOP3Pump.fakeServer: (out) the POP3 incoming server gPOP3Pump.resetPluggableStore(): function to change the pluggable store for the server to the input parameter's store. (in) pluggable store contract ID adapted from test_pop3GetNewMail.js Original Author: Kent James <kent@caspia.com> 7728
PromiseTestUtils.sys.mjs This file provides utilities useful in using Promises and Task.sys.mjs with mailnews tests. 13231
searchTestUtils.js TestSearch: Class to test number of search hits @param {nsIMsgFolder} aFolder - The folder to search @param {string|integer} aValue - value used for the search The interpretation of aValue depends on aAttrib. It defaults to string, but for certain attributes other types are used. WARNING: not all attributes have been tested. @param {nsMsgSearchAttrib} aAttrib - Attribute for the search (Ci.nsMsgSearchAttrib.Size, etc.) @param {nsMsgSearchOp} aOp - Operation for the search (Ci.nsMsgSearchOp.Contains, etc.) @param {integer} aHitCount - Expected number of search hits @param {Function} onDone - Function to call on completion of search @param {string} aCustomId - Id string for the custom action, if aAttrib is Custom @param {string} aArbitraryHeader - For OtherHeader case, header. @param {string|integer} aHdrProperty - For HdrProperty and Uint32HdrProperty case 4586
ServerTestUtils.sys.mjs Tools for starting test servers. A number of common configurations are defined for speedy test creation. 8866
SmimeUtils.sys.mjs This file provides some utilities for helping run S/MIME tests. 2107