canmove, Confirmed users, Bureaucrats and Sysops emeriti
3,628
edits
(Drop the comming soon section, we have those or at least the initial fixes and we won't keep it up to date once we get it going.) |
(→MailNews xpcshell test facilities: Update with curent information on profile directories) |
||
| Line 25: | Line 25: | ||
=== MailNews xpcshell test facilities === | === MailNews xpcshell test facilities === | ||
Each existing unit test directory has head_*.js | Each existing unit test directory has a head_*.js file that provides the following by importing core scripts: | ||
* A global variable " | * A global variable "gProfileDir" containing an nsIFile variable with the profile directory to use for the xpcshell tests. | ||
* A nsIDirectoryService that points at the | * A nsIDirectoryService that points at the gProfileDir and provides the necessary facilities to use profile-related directories, e.g. NS_GetSystemDirectory("MailD", ...). | ||
=== Profile Directory Cleanup === | |||
The xpcshell tests do not run in a standard profile directory. The mailnews xpcshell test facilities provide a specific directory for its tests: | |||
<pre> | |||
<objdir>/_tests/mailtest/ | |||
</pre> | |||
This directory is emptied and re-created before each test is run. This means that when running a test with SOLO_FILE and check-one or check-interactive, the directory is left in place to aid debugging. | |||
== Guidelines for new tests == | == Guidelines for new tests == | ||