Bug 857127 - Clean up health report logging after test finishes; r=rnewman

This was producing periodic output in the test harness, confusing
automation into thinking the test was still actively running.
This commit is contained in:
Gregory Szorc 2013-06-13 16:57:58 -07:00
parent e3ca54ea79
commit 6fd2ccd32e

View File

@ -53,15 +53,17 @@ function waitForNotificationClose(notification, cb) {
observer.observe(parent, {childList: true});
}
let dumpAppender, rootLogger;
function test() {
waitForExplicitFinish();
let ns = {};
Components.utils.import("resource://services-common/log4moz.js", ns);
let rootLogger = ns.Log4Moz.repository.rootLogger;
let appender = new ns.Log4Moz.DumpAppender();
appender.level = ns.Log4Moz.Level.All;
rootLogger.addAppender(appender);
rootLogger = ns.Log4Moz.repository.rootLogger;
dumpAppender = new ns.Log4Moz.DumpAppender();
dumpAppender.level = ns.Log4Moz.Level.All;
rootLogger.addAppender(dumpAppender);
let notification = document.getElementById("global-notificationbox");
let policy;
@ -126,6 +128,9 @@ function test_multiple_windows() {
}
dump("Finishing multiple window test.\n");
rootLogger.removeAppender(dumpAppender);
delete dumpAppender;
delete rootLogger;
finish();
}