Commit 9845ce7a authored by Erik Luo's avatar Erik Luo Committed by Commit Bot

DevTools: cleanup experiments that were default since M64

Some default experiments were removed
- Accessibility inspection
- Log management
- Performance monitor

Bug: none
Change-Id: I97bc4ac1883cdb0001fb807f56009c54ca7773b3
Reviewed-on: https://chromium-review.googlesource.com/882312
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: default avatarPavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533212}
parent 40ef7687
......@@ -11,7 +11,6 @@
}
],
"dependencies": ["elements"],
"experiment": "accessibilityInspection",
"scripts": [
"AccessibilityModel.js",
"AccessibilitySidebarView.js",
......
......@@ -9,7 +9,6 @@ Console.ConsoleSidebar = class extends UI.VBox {
constructor(badgePool) {
super(true);
this.setMinimumSize(125, 0);
this._enabled = Runtime.experiments.isEnabled('logManagement');
this._tree = new UI.TreeOutlineInShadow();
this._tree.registerRequiredCSS('console/consoleSidebar.css');
......@@ -68,8 +67,6 @@ Console.ConsoleSidebar = class extends UI.VBox {
}
clear() {
if (!this._enabled)
return;
for (var treeElement of this._treeElements)
treeElement.clear();
}
......@@ -78,8 +75,6 @@ Console.ConsoleSidebar = class extends UI.VBox {
* @param {!Console.ConsoleViewMessage} viewMessage
*/
onMessageAdded(viewMessage) {
if (!this._enabled)
return;
for (var treeElement of this._treeElements)
treeElement.onMessageAdded(viewMessage);
}
......@@ -89,7 +84,7 @@ Console.ConsoleSidebar = class extends UI.VBox {
* @return {boolean}
*/
shouldBeVisible(viewMessage) {
if (!this._enabled || !this._selectedTreeElement)
if (!this._selectedTreeElement)
return true;
return this._selectedTreeElement._filter.shouldBeVisible(viewMessage);
}
......
......@@ -48,27 +48,22 @@ Console.ConsoleView = class extends UI.VBox {
this._filter = new Console.ConsoleViewFilter(this._onFilterChanged.bind(this));
var toolbar = new UI.Toolbar('', this.element);
var isLogManagementEnabled = Runtime.experiments.isEnabled('logManagement');
if (isLogManagementEnabled) {
this._splitWidget =
new UI.SplitWidget(true /* isVertical */, false /* secondIsSidebar */, 'console.sidebar.width', 100);
this._splitWidget.setMainWidget(this._searchableView);
this._splitWidget.setSidebarWidget(this._sidebar);
this._splitWidget.show(this.element);
this._splitWidget.hideSidebar();
this._splitWidget.enableShowModeSaving();
this._isSidebarOpen = this._splitWidget.showMode() === UI.SplitWidget.ShowMode.Both;
if (this._isSidebarOpen)
this._filter._levelMenuButton.setEnabled(false);
toolbar.appendToolbarItem(this._splitWidget.createShowHideSidebarButton('console sidebar'));
this._splitWidget.addEventListener(UI.SplitWidget.Events.ShowModeChanged, event => {
this._isSidebarOpen = event.data === UI.SplitWidget.ShowMode.Both;
this._filter._levelMenuButton.setEnabled(!this._isSidebarOpen);
this._onFilterChanged();
});
} else {
this._searchableView.show(this.element);
}
this._splitWidget =
new UI.SplitWidget(true /* isVertical */, false /* secondIsSidebar */, 'console.sidebar.width', 100);
this._splitWidget.setMainWidget(this._searchableView);
this._splitWidget.setSidebarWidget(this._sidebar);
this._splitWidget.show(this.element);
this._splitWidget.hideSidebar();
this._splitWidget.enableShowModeSaving();
this._isSidebarOpen = this._splitWidget.showMode() === UI.SplitWidget.ShowMode.Both;
if (this._isSidebarOpen)
this._filter._levelMenuButton.setEnabled(false);
toolbar.appendToolbarItem(this._splitWidget.createShowHideSidebarButton('console sidebar'));
this._splitWidget.addEventListener(UI.SplitWidget.Events.ShowModeChanged, event => {
this._isSidebarOpen = event.data === UI.SplitWidget.ShowMode.Both;
this._filter._levelMenuButton.setEnabled(!this._isSidebarOpen);
this._onFilterChanged();
});
this._contentsElement = this._searchableView.element;
this.element.classList.add('console-view');
......@@ -125,9 +120,6 @@ Console.ConsoleView = class extends UI.VBox {
this._filter._filterByExecutionContextSetting,
Common.UIString('Only show messages from the current context (top, iframe, worker, extension)'),
Common.UIString('Selected context only'));
var filterConsoleAPICheckbox = new UI.ToolbarSettingCheckbox(
Common.moduleSetting('consoleAPIFilterEnabled'), Common.UIString('Only show messages from console API methods'),
Common.UIString('User messages only'));
var monitoringXHREnabledSetting = Common.moduleSetting('monitoringXHREnabled');
this._timestampsSetting = Common.moduleSetting('consoleTimestampsEnabled');
this._consoleHistoryAutocompleteSetting = Common.moduleSetting('consoleHistoryAutocomplete');
......@@ -141,8 +133,6 @@ Console.ConsoleView = class extends UI.VBox {
settingsToolbarLeft.appendToolbarItem(this._hideNetworkMessagesCheckbox);
settingsToolbarLeft.appendToolbarItem(this._preserveLogCheckbox);
settingsToolbarLeft.appendToolbarItem(filterByExecutionContextCheckbox);
if (!isLogManagementEnabled)
settingsToolbarLeft.appendToolbarItem(filterConsoleAPICheckbox);
var settingsToolbarRight = new UI.Toolbar('', settingsPane.element);
settingsToolbarRight.makeVertical();
......@@ -1193,13 +1183,11 @@ Console.ConsoleViewFilter = class {
this._messageLevelFiltersSetting = Console.ConsoleViewFilter.levelFilterSetting();
this._hideNetworkMessagesSetting = Common.moduleSetting('hideNetworkMessages');
this._filterByExecutionContextSetting = Common.moduleSetting('selectedContextFilterEnabled');
this._filterByConsoleAPISetting = Common.moduleSetting('consoleAPIFilterEnabled');
this._messageURLFiltersSetting.addChangeListener(this._onFilterChanged.bind(this));
this._messageLevelFiltersSetting.addChangeListener(this._onFilterChanged.bind(this));
this._hideNetworkMessagesSetting.addChangeListener(this._onFilterChanged.bind(this));
this._filterByExecutionContextSetting.addChangeListener(this._onFilterChanged.bind(this));
this._filterByConsoleAPISetting.addChangeListener(this._onFilterChanged.bind(this));
UI.context.addFlavorChangeListener(SDK.ExecutionContext, this._onFilterChanged, this);
var filterKeys = Object.values(Console.ConsoleFilter.FilterType);
......@@ -1265,14 +1253,6 @@ Console.ConsoleViewFilter = class {
});
}
if (this._filterByConsoleAPISetting.get()) {
parsedFilters.push({
key: Console.ConsoleFilter.FilterType.Source,
text: ConsoleModel.ConsoleMessage.MessageSource.ConsoleAPI,
negative: false
});
}
var blockedURLs = Object.keys(this._messageURLFiltersSetting.get());
var urlFilters = blockedURLs.map(url => ({key: Console.ConsoleFilter.FilterType.Url, text: url, negative: true}));
parsedFilters = parsedFilters.concat(urlFilters);
......@@ -1385,7 +1365,6 @@ Console.ConsoleViewFilter = class {
this._messageURLFiltersSetting.set({});
this._messageLevelFiltersSetting.set(Console.ConsoleFilter.defaultLevelsFilterValue());
this._filterByExecutionContextSetting.set(false);
this._filterByConsoleAPISetting.set(false);
this._hideNetworkMessagesSetting.set(false);
this._textFilterUI.setValue('');
this._onFilterChanged();
......
......@@ -96,25 +96,6 @@
}
]
},
{
"type": "setting",
"category": "Console",
"title": "User messages only",
"settingName": "consoleAPIFilterEnabled",
"settingType": "boolean",
"storageType": "session",
"defaultValue": false,
"options": [
{
"value": true,
"title": "Only show messages from console API methods"
},
{
"value": false,
"title": "Show messages from all sources"
}
]
},
{
"type": "setting",
"category": "Console",
......
......@@ -111,16 +111,13 @@ Main.Main = class {
_initializeExperiments() {
// Keep this sorted alphabetically: both keys and values.
Runtime.experiments.register('accessibilityInspection', 'Accessibility Inspection');
Runtime.experiments.register('applyCustomStylesheet', 'Allow custom UI themes');
Runtime.experiments.register('blackboxJSFramesOnTimeline', 'Blackbox JavaScript frames on Timeline', true);
Runtime.experiments.register('colorContrastRatio', 'Color contrast ratio line in color picker', true);
Runtime.experiments.register('emptySourceMapAutoStepping', 'Empty sourcemap auto-stepping');
Runtime.experiments.register('inputEventsOnTimelineOverview', 'Input events on Timeline overview', true);
Runtime.experiments.register('oopifInlineDOM', 'OOPIF: inline DOM ', true);
Runtime.experiments.register('logManagement', 'Log management', true);
Runtime.experiments.register('nativeHeapProfiler', 'Native memory sampling heap profiler', true);
Runtime.experiments.register('performanceMonitor', 'Performance Monitor', true);
Runtime.experiments.register('sourceDiff', 'Source diff');
Runtime.experiments.register(
'stepIntoAsync', 'Introduce separate step action, stepInto becomes powerful enough to go inside async call');
......@@ -143,18 +140,12 @@ Main.Main = class {
if (Host.isUnderTest()) {
var testPath = Runtime.queryParam('test');
// Enable experiments for testing.
if (testPath.indexOf('accessibility/') !== -1)
Runtime.experiments.enableForTest('accessibilityInspection');
if (testPath.indexOf('console-sidebar/') !== -1)
Runtime.experiments.enableForTest('logManagement');
if (testPath.indexOf('oopif/') !== -1)
Runtime.experiments.enableForTest('oopifInlineDOM');
}
Runtime.experiments.setDefaultExperiments([
'accessibilityInspection', 'colorContrastRatio', 'logManagement', 'performanceMonitor', 'stepIntoAsync',
'timelineKeepHistory', 'oopifInlineDOM'
]);
Runtime.experiments.setDefaultExperiments(
['colorContrastRatio', 'stepIntoAsync', 'timelineKeepHistory', 'oopifInlineDOM']);
}
/**
......
......@@ -16,7 +16,6 @@
"persistence": "closeable",
"order": 100,
"className": "Timeline.PerformanceMonitor",
"experiment": "performanceMonitor",
"tags": "performance, system monitor, monitor, activity, metrics"
},
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment