Last weekend I decide to add some Mochitest unit testing to XUL Explorer, one of my XULRunner based applications. Luckily, this is something Dave Townsend already did with a different XULRunner application, McCoy. It was pretty easy to use Dave’s McCoy patch as a basis for getting things working in XUL Explorer. I used XULRunner 1.9.0.4 for building XUL Explorer and, amazingly, my unit tests ran on the first try! Here’s the changeset.
Next, I started working on adding the same support to Fennec. I hit a snag because of changes in Mozilla 1.9.1 to support new types of testing. I made a patch (reviewed and waiting to land) that makes things work again. We are hoping that some of the tweaks needed by Dave’s patch can be rolled into the mainline Mochitests system.
Now that I have some experience under my belt, I plan to add some docs no MDC. I also plan to add the necessary code templates to XUL Explorer and FizzyPop application generators, so anyone making a new XUL application automatically get Mochitest support.
Thanks Dave 🙂