Bug 845549 - Expose an helper to ease testing console output in tests

https://bugzilla.mozilla.org/show_bug.cgi?id=845549