зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1307881 - Part 1 - Split message persistence prefs into two, one for the netmonitor and one for the console;r=Honza
MozReview-Commit-ID: 4i8heIyPEv0 --HG-- extra : rebase_source : 2f3d35329126866b0c85d3620fb9f3d046ff3a85
This commit is contained in:
Родитель
6feeb8950f
Коммит
07e14766fa
|
@ -1740,7 +1740,7 @@ BrowserGlue.prototype = {
|
||||||
|
|
||||||
// eslint-disable-next-line complexity
|
// eslint-disable-next-line complexity
|
||||||
_migrateUI: function BG__migrateUI() {
|
_migrateUI: function BG__migrateUI() {
|
||||||
const UI_VERSION = 51;
|
const UI_VERSION = 52;
|
||||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
|
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
|
||||||
|
|
||||||
let currentUIVersion;
|
let currentUIVersion;
|
||||||
|
@ -2110,6 +2110,14 @@ BrowserGlue.prototype = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (currentUIVersion < 52) {
|
||||||
|
// Keep old devtools log persistence behavior after splitting netmonitor and
|
||||||
|
// webconsole prefs (bug 1307881).
|
||||||
|
if (Services.prefs.getBoolPref("devtools.webconsole.persistlog")) {
|
||||||
|
Services.prefs.setBoolPref("devtools.netmonitor.persistlog", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Update the migration version.
|
// Update the migration version.
|
||||||
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
||||||
},
|
},
|
||||||
|
|
|
@ -41,14 +41,6 @@
|
||||||
<legend>&options.selectDevToolsTheme.label2;</legend>
|
<legend>&options.selectDevToolsTheme.label2;</legend>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset id="commonprefs-options" class="options-groupbox">
|
|
||||||
<legend>&options.commonPrefs.label;</legend>
|
|
||||||
<label title="&options.enablePersistentLogs.tooltip;">
|
|
||||||
<input type="checkbox" data-pref="devtools.webconsole.persistlog" />
|
|
||||||
<span>&options.enablePersistentLogs.label;</span>
|
|
||||||
</label>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset id="inspector-options" class="options-groupbox">
|
<fieldset id="inspector-options" class="options-groupbox">
|
||||||
<legend>&options.context.inspector;</legend>
|
<legend>&options.context.inspector;</legend>
|
||||||
<label title="&options.showUserAgentStyles.tooltip;">
|
<label title="&options.showUserAgentStyles.tooltip;">
|
||||||
|
@ -94,6 +86,14 @@
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset id="netmonitor-options" class="options-groupbox">
|
||||||
|
<legend>&options.netmonitor.label;</legend>
|
||||||
|
<label title="&options.netmonitor.enablePersistentLogs.tooltip;">
|
||||||
|
<input type="checkbox" data-pref="devtools.netmonitor.persistlog" />
|
||||||
|
<span>&options.netmonitor.enablePersistentLogs.label;</span>
|
||||||
|
</label>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
<fieldset id="styleeditor-options" class="options-groupbox">
|
<fieldset id="styleeditor-options" class="options-groupbox">
|
||||||
<legend>&options.styleeditor.label;</legend>
|
<legend>&options.styleeditor.label;</legend>
|
||||||
<label title="&options.stylesheetSourceMaps.tooltip;">
|
<label title="&options.stylesheetSourceMaps.tooltip;">
|
||||||
|
|
|
@ -179,17 +179,16 @@
|
||||||
<!ENTITY options.screenshot.audio.label "Play camera shutter sound">
|
<!ENTITY options.screenshot.audio.label "Play camera shutter sound">
|
||||||
<!ENTITY options.screenshot.audio.tooltip "Enables the camera audio sound when taking screenshot">
|
<!ENTITY options.screenshot.audio.tooltip "Enables the camera audio sound when taking screenshot">
|
||||||
|
|
||||||
<!-- LOCALIZATION NOTE (options.commonprefs): This is the label for the heading
|
<!-- LOCALIZATION NOTE (options.netmonitor.label): This is the label for the
|
||||||
of all preferences that affect both the Web Console and the Network
|
- heading of the group of Network Monitor preferences in the options panel. -->
|
||||||
Monitor -->
|
<!ENTITY options.netmonitor.label "Network">
|
||||||
<!ENTITY options.commonPrefs.label "Common Preferences">
|
|
||||||
|
|
||||||
<!-- LOCALIZATION NOTE (options.enablePersistentLogs.label): This is the
|
<!-- LOCALIZATION NOTE (options.enablePersistentLogs.label): This is the
|
||||||
- label for the checkbox that toggles persistent logs in the Web Console and
|
- label for the checkbox that toggles persistent logs in the netmonitor,
|
||||||
- network monitor, i.e. devtools.webconsole.persistlog a boolean preference in
|
- i.e. devtools.netmonitor.persistlog a boolean preference in
|
||||||
- about:config, in the options panel. -->
|
- about:config, in the options panel. -->
|
||||||
<!ENTITY options.enablePersistentLogs.label "Enable persistent logs">
|
<!ENTITY options.netmonitor.enablePersistentLogs.label "Enable persistent logs">
|
||||||
<!ENTITY options.enablePersistentLogs.tooltip "If you enable this option the Web Console and Network Monitor will not clear the output each time you navigate to a new page">
|
<!ENTITY options.netmonitor.enablePersistentLogs.tooltip "If you enable this option the Network Monitor will not clear the output each time you navigate to a new page">
|
||||||
|
|
||||||
<!-- LOCALIZATION NOTE (options.showPlatformData.label): This is the
|
<!-- LOCALIZATION NOTE (options.showPlatformData.label): This is the
|
||||||
- label for the checkbox that toggles the display of the platform data in the,
|
- label for the checkbox that toggles the display of the platform data in the,
|
||||||
|
|
|
@ -35,7 +35,7 @@ pref("devtools.netmonitor.har.compress", false);
|
||||||
pref("devtools.netmonitor.har.forceExport", false);
|
pref("devtools.netmonitor.har.forceExport", false);
|
||||||
pref("devtools.netmonitor.har.pageLoadedTimeout", 1500);
|
pref("devtools.netmonitor.har.pageLoadedTimeout", 1500);
|
||||||
pref("devtools.netmonitor.har.enableAutoExportToFile", false);
|
pref("devtools.netmonitor.har.enableAutoExportToFile", false);
|
||||||
pref("devtools.webconsole.persistlog", false);
|
pref("devtools.netmonitor.persistlog", false);
|
||||||
pref("devtools.styleeditor.enabled", true);
|
pref("devtools.styleeditor.enabled", true);
|
||||||
|
|
||||||
const { configureStore } = require("./src/utils/create-store");
|
const { configureStore } = require("./src/utils/create-store");
|
||||||
|
|
|
@ -82,7 +82,7 @@ class FirefoxConnector {
|
||||||
}
|
}
|
||||||
|
|
||||||
willNavigate() {
|
willNavigate() {
|
||||||
if (!Services.prefs.getBoolPref("devtools.webconsole.persistlog")) {
|
if (!Services.prefs.getBoolPref("devtools.netmonitor.persistlog")) {
|
||||||
this.actions.batchReset();
|
this.actions.batchReset();
|
||||||
this.actions.clearRequests();
|
this.actions.clearRequests();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -14,7 +14,7 @@ add_task(function* () {
|
||||||
|
|
||||||
let { document } = monitor.panelWin;
|
let { document } = monitor.panelWin;
|
||||||
|
|
||||||
Services.prefs.setBoolPref("devtools.webconsole.persistlog", false);
|
Services.prefs.setBoolPref("devtools.netmonitor.persistlog", false);
|
||||||
|
|
||||||
yield reloadAndWait();
|
yield reloadAndWait();
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ add_task(function* () {
|
||||||
"The request list should still have two items at this point.");
|
"The request list should still have two items at this point.");
|
||||||
|
|
||||||
// Now we toggle the persistence logs on
|
// Now we toggle the persistence logs on
|
||||||
Services.prefs.setBoolPref("devtools.webconsole.persistlog", true);
|
Services.prefs.setBoolPref("devtools.netmonitor.persistlog", true);
|
||||||
|
|
||||||
yield reloadAndWait();
|
yield reloadAndWait();
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ add_task(function* () {
|
||||||
is(document.querySelectorAll(".request-list-item").length, 4,
|
is(document.querySelectorAll(".request-list-item").length, 4,
|
||||||
"The request list should now have four items at this point.");
|
"The request list should now have four items at this point.");
|
||||||
|
|
||||||
Services.prefs.setBoolPref("devtools.webconsole.persistlog", false);
|
Services.prefs.setBoolPref("devtools.netmonitor.persistlog", false);
|
||||||
return teardown(monitor);
|
return teardown(monitor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -287,10 +287,11 @@ pref("devtools.webconsole.ui.filterbar", false);
|
||||||
// Max number of inputs to store in web console history.
|
// Max number of inputs to store in web console history.
|
||||||
pref("devtools.webconsole.inputHistoryCount", 50);
|
pref("devtools.webconsole.inputHistoryCount", 50);
|
||||||
|
|
||||||
// Persistent logging: |true| if you want the Web Console to keep all of the
|
// Persistent logging: |true| if you want the relevant tool to keep all of the
|
||||||
// logged messages after reloading the page, |false| if you want the output to
|
// logged messages after reloading the page, |false| if you want the output to
|
||||||
// be cleared each time page navigation happens.
|
// be cleared each time page navigation happens.
|
||||||
pref("devtools.webconsole.persistlog", false);
|
pref("devtools.webconsole.persistlog", false);
|
||||||
|
pref("devtools.netmonitor.persistlog", false);
|
||||||
|
|
||||||
// Web Console timestamp: |true| if you want the logs and instructions
|
// Web Console timestamp: |true| if you want the logs and instructions
|
||||||
// in the Web Console to display a timestamp, or |false| to not display
|
// in the Web Console to display a timestamp, or |false| to not display
|
||||||
|
|
Загрузка…
Ссылка в новой задаче