I tried to do a simple xpcshell unit test in the imap directory, and ran into various problems. I don't really have time to pursue that at the moment, but I still think it would be useful to have a simple demonstration test that shows how to use the framework to test simple imap issues. I will attach to this patch the work to date. That patch test runs to completion, but has a memory leak. It would be good to also demonstrate how to access the injected message for testing purposes, which I did not attempt.
Created attachment 435320 [details] [diff] [review] WIP, works but leaks This patch fixed to issues in the framework: 1) the imap head file was being loaded twice, 2) the imap inbox was not fully initialized in the framework It is also clear that the definition of "folder" is ambiguous in the framework. Local seems to want an nsIMsgFolder, while imap wants a uri. That took awhile to figure out.