Bug 966692 - Reduce the default set of warnings we display in console; r=msucan

This commit is contained in:
Rob Campbell 2014-02-20 16:16:00 -05:00
parent 5cd63b9de6
commit ade96dbbe6
5 changed files with 22 additions and 3 deletions

View File

@ -1207,13 +1207,13 @@ pref("devtools.gcli.eagerHelper", 2);
// Remember the Web Console filters
pref("devtools.webconsole.filter.network", true);
pref("devtools.webconsole.filter.networkinfo", true);
pref("devtools.webconsole.filter.networkinfo", false);
pref("devtools.webconsole.filter.netwarn", true);
pref("devtools.webconsole.filter.csserror", true);
pref("devtools.webconsole.filter.cssparser", false);
pref("devtools.webconsole.filter.csslog", false);
pref("devtools.webconsole.filter.exception", true);
pref("devtools.webconsole.filter.jswarn", true);
pref("devtools.webconsole.filter.jswarn", false);
pref("devtools.webconsole.filter.jslog", true);
pref("devtools.webconsole.filter.error", true);
pref("devtools.webconsole.filter.warn", true);

View File

@ -13,10 +13,14 @@ let output = null;
let menu = null;
function test() {
let originalNetPref = Services.prefs.getBoolPref("devtools.webconsole.filter.networkinfo");
registerCleanupFunction(() => {
Services.prefs.setBoolPref("devtools.webconsole.filter.networkinfo", originalNetPref);
HUD = output = menu = null;
});
Services.prefs.setBoolPref("devtools.webconsole.filter.networkinfo", true);
addTab(TEST_URI);
browser.addEventListener("load", function onLoad() {
browser.removeEventListener("load", onLoad, true);

View File

@ -17,8 +17,13 @@ let requestCallback = null;
function test()
{
const PREF = "devtools.webconsole.persistlog";
let original = Services.prefs.getBoolPref("devtools.webconsole.filter.networkinfo");
Services.prefs.setBoolPref("devtools.webconsole.filter.networkinfo", true);
Services.prefs.setBoolPref(PREF, true);
registerCleanupFunction(() => Services.prefs.clearUserPref(PREF));
registerCleanupFunction(() => {
Services.prefs.setBoolPref("devtools.webconsole.filter.networkinfo", original);
Services.prefs.clearUserPref(PREF);
});
addTab("data:text/html;charset=utf-8,Web Console network logging tests");

View File

@ -11,6 +11,11 @@ const CONTEXT_MENU_ID = "#menu_openURL";
let HUD = null, outputNode = null, contextMenu = null;
function test() {
let original = Services.prefs.getBoolPref("devtools.webconsole.filter.networkinfo");
Services.prefs.setBoolPref("devtools.webconsole.filter.networkinfo", true);
registerCleanupFunction(() => {
Services.prefs.setBoolPref("devtools.webconsole.filter.networkinfo", original);
});
addTab(TEST_URI);
browser.addEventListener("load", function onLoad() {
browser.removeEventListener("load", onLoad, true);

View File

@ -6,6 +6,11 @@
// navigate to that destination (bug 975707).
function test() {
let originalNetPref = Services.prefs.getBoolPref("devtools.webconsole.filter.networkinfo");
registerCleanupFunction(() => {
Services.prefs.setBoolPref("devtools.webconsole.filter.networkinfo", originalNetPref);
});
Services.prefs.setBoolPref("devtools.webconsole.filter.networkinfo", true);
Task.spawn(runner).then(finishTest);
function* runner() {