Name Description Size
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. 2403
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(). 12074
filterTestUtils.js Creates a filter and appends it to the nsIMsgFilterList. @param list An nsIMsgFilter to which the new filter will be appended. @param trigger A key of ATTRIB_MAP that represents the filter trigger. @param value The value of the filter trigger. @param action A key of ACTION_MAP that represents the action to be taken. 3058
folderEventLogHelper.js import-globals-from logHelper.js 5673
IMAPpump.jsm 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. 4932
LocalAccountUtils.jsm Create an nsIMsgIncomingServer and an nsIMsgAccount to go with it. @param aType The type of the server (pop3, imap etc). @param aPort The port the server is on. @param aUsername The username for the server. @param aPassword The password for the server. @param aHostname The hostname for the server (defaults to localhost). @return The newly-created nsIMsgIncomingServer. 5915
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. 19853
mailShutdown.js Provides methods to make sure our test shuts down mailnews properly. 1906
MailTestUtils.jsm Returns the file system a particular file is on. Currently supported on Windows only. @param aFile The file to get the file system for. @return The file system a particular file is on, or 'null' if not on Windows. 20556
MessageGenerator.jsm 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! 50807
MessageInjection.jsm 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. 36954
msgFolderListenerSetup.js globals mailTestUtils 14105
NetworkTestUtils.jsm This file provides utilities useful in testing more advanced networking scenarios, such as proxies and SSL connections. 8934
passwordStorage.js globals gDEPTH 785
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> 7844
PromiseTestUtils.jsm This file provides utilities useful in using Promises and Task.jsm with mailnews tests. 8941
searchTestUtils.js TestSearch: Class to test number of search hits @param aFolder: the folder to search @param 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 aAttrib: attribute for the search (Ci.nsMsgSearchAttrib.Size, etc.) @param aOp: operation for the search (Ci.nsMsgSearchOp.Contains, etc.) @param aHitCount: expected number of search hits @param onDone: function to call on completion of search @param aCustomId: id string for the custom action, if aAttrib is Custom @param aArbitraryHeader for OtherHeader case, header. @param aHdrProperty for HdrProperty and Uint32HdrProperty case 4576
smimeUtils.jsm This file provides some utilities for helping run S/MIME tests. 2181
.eslintrc.js 80