Test unit for .xul (or for an override of browser.xul), and/or filtering of output from Browser console in shell

[email protected] Fri, 21 Nov 2014 20:32:58 -0800 (PST)
Newsgroups gmane.comp.mozilla.devel.xpfe
Message-ID <[email protected]>
Background

I've got an XPI, which overrides chrome://browser/content/browser.xul. I'd like to test it after (re)starting Firefox several times in a sequence. Ideally the test would be for any OS, or at least for Linux/Mac OS.

What I've done so far:
- I have another .xul specific for tests (called checkAndQuit.xul). It runs the checks, it prints any errors to Browser console, then it quits the browser.
- I start firefox binary with that .xul, i.e. firefox -no-remote -chrome chrome://selite-extension-sequencer/content/extensions/checkAndQuit.xul
- however, that also shows errors/warnings related to the OS (or who knows what), which I'd like to filter out

Questions

1. When I redirect stderr to stdout and then pipe it, the messages from Browser console seem to disappear:
firefox -no-remote -chrome chrome://selite-extension-sequencer/content/extensions/checkAndQuit.xul 2>&1 | egrep 'mySearch|Regular|Expression'

2. Are there any better ways to test start up of .xul (or overrides of browser.xul, if possible)?