I haven't started using it yet, but UxU seems like a really good tool for unit testing Firefox extensions. I do not know how well it can work with XPCOM, but I believe that it runs tests from a context where it has the permissions necessary for this kind of thing.
source
share