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 @@ ...@@ -11,7 +11,6 @@
} }
], ],
"dependencies": ["elements"], "dependencies": ["elements"],
"experiment": "accessibilityInspection",
"scripts": [ "scripts": [
"AccessibilityModel.js", "AccessibilityModel.js",
"AccessibilitySidebarView.js", "AccessibilitySidebarView.js",
......
...@@ -9,7 +9,6 @@ Console.ConsoleSidebar = class extends UI.VBox { ...@@ -9,7 +9,6 @@ Console.ConsoleSidebar = class extends UI.VBox {
constructor(badgePool) { constructor(badgePool) {
super(true); super(true);
this.setMinimumSize(125, 0); this.setMinimumSize(125, 0);
this._enabled = Runtime.experiments.isEnabled('logManagement');
this._tree = new UI.TreeOutlineInShadow(); this._tree = new UI.TreeOutlineInShadow();
this._tree.registerRequiredCSS('console/consoleSidebar.css'); this._tree.registerRequiredCSS('console/consoleSidebar.css');
...@@ -68,8 +67,6 @@ Console.ConsoleSidebar = class extends UI.VBox { ...@@ -68,8 +67,6 @@ Console.ConsoleSidebar = class extends UI.VBox {
} }
clear() { clear() {
if (!this._enabled)
return;
for (var treeElement of this._treeElements) for (var treeElement of this._treeElements)
treeElement.clear(); treeElement.clear();
} }
...@@ -78,8 +75,6 @@ Console.ConsoleSidebar = class extends UI.VBox { ...@@ -78,8 +75,6 @@ Console.ConsoleSidebar = class extends UI.VBox {
* @param {!Console.ConsoleViewMessage} viewMessage * @param {!Console.ConsoleViewMessage} viewMessage
*/ */
onMessageAdded(viewMessage) { onMessageAdded(viewMessage) {
if (!this._enabled)
return;
for (var treeElement of this._treeElements) for (var treeElement of this._treeElements)
treeElement.onMessageAdded(viewMessage); treeElement.onMessageAdded(viewMessage);
} }
...@@ -89,7 +84,7 @@ Console.ConsoleSidebar = class extends UI.VBox { ...@@ -89,7 +84,7 @@ Console.ConsoleSidebar = class extends UI.VBox {
* @return {boolean} * @return {boolean}
*/ */
shouldBeVisible(viewMessage) { shouldBeVisible(viewMessage) {
if (!this._enabled || !this._selectedTreeElement) if (!this._selectedTreeElement)
return true; return true;
return this._selectedTreeElement._filter.shouldBeVisible(viewMessage); return this._selectedTreeElement._filter.shouldBeVisible(viewMessage);
} }
......
...@@ -48,27 +48,22 @@ Console.ConsoleView = class extends UI.VBox { ...@@ -48,27 +48,22 @@ Console.ConsoleView = class extends UI.VBox {
this._filter = new Console.ConsoleViewFilter(this._onFilterChanged.bind(this)); this._filter = new Console.ConsoleViewFilter(this._onFilterChanged.bind(this));
var toolbar = new UI.Toolbar('', this.element); var toolbar = new UI.Toolbar('', this.element);
var isLogManagementEnabled = Runtime.experiments.isEnabled('logManagement'); this._splitWidget =
if (isLogManagementEnabled) { new UI.SplitWidget(true /* isVertical */, false /* secondIsSidebar */, 'console.sidebar.width', 100);
this._splitWidget = this._splitWidget.setMainWidget(this._searchableView);
new UI.SplitWidget(true /* isVertical */, false /* secondIsSidebar */, 'console.sidebar.width', 100); this._splitWidget.setSidebarWidget(this._sidebar);
this._splitWidget.setMainWidget(this._searchableView); this._splitWidget.show(this.element);
this._splitWidget.setSidebarWidget(this._sidebar); this._splitWidget.hideSidebar();
this._splitWidget.show(this.element); this._splitWidget.enableShowModeSaving();
this._splitWidget.hideSidebar(); this._isSidebarOpen = this._splitWidget.showMode() === UI.SplitWidget.ShowMode.Both;
this._splitWidget.enableShowModeSaving(); if (this._isSidebarOpen)
this._isSidebarOpen = this._splitWidget.showMode() === UI.SplitWidget.ShowMode.Both; this._filter._levelMenuButton.setEnabled(false);
if (this._isSidebarOpen) toolbar.appendToolbarItem(this._splitWidget.createShowHideSidebarButton('console sidebar'));
this._filter._levelMenuButton.setEnabled(false); this._splitWidget.addEventListener(UI.SplitWidget.Events.ShowModeChanged, event => {
toolbar.appendToolbarItem(this._splitWidget.createShowHideSidebarButton('console sidebar')); this._isSidebarOpen = event.data === UI.SplitWidget.ShowMode.Both;
this._splitWidget.addEventListener(UI.SplitWidget.Events.ShowModeChanged, event => { this._filter._levelMenuButton.setEnabled(!this._isSidebarOpen);
this._isSidebarOpen = event.data === UI.SplitWidget.ShowMode.Both; this._onFilterChanged();
this._filter._levelMenuButton.setEnabled(!this._isSidebarOpen); });
this._onFilterChanged();
});
} else {
this._searchableView.show(this.element);
}
this._contentsElement = this._searchableView.element; this._contentsElement = this._searchableView.element;
this.element.classList.add('console-view'); this.element.classList.add('console-view');
...@@ -125,9 +120,6 @@ Console.ConsoleView = class extends UI.VBox { ...@@ -125,9 +120,6 @@ Console.ConsoleView = class extends UI.VBox {
this._filter._filterByExecutionContextSetting, this._filter._filterByExecutionContextSetting,
Common.UIString('Only show messages from the current context (top, iframe, worker, extension)'), Common.UIString('Only show messages from the current context (top, iframe, worker, extension)'),
Common.UIString('Selected context only')); 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'); var monitoringXHREnabledSetting = Common.moduleSetting('monitoringXHREnabled');
this._timestampsSetting = Common.moduleSetting('consoleTimestampsEnabled'); this._timestampsSetting = Common.moduleSetting('consoleTimestampsEnabled');
this._consoleHistoryAutocompleteSetting = Common.moduleSetting('consoleHistoryAutocomplete'); this._consoleHistoryAutocompleteSetting = Common.moduleSetting('consoleHistoryAutocomplete');
...@@ -141,8 +133,6 @@ Console.ConsoleView = class extends UI.VBox { ...@@ -141,8 +133,6 @@ Console.ConsoleView = class extends UI.VBox {
settingsToolbarLeft.appendToolbarItem(this._hideNetworkMessagesCheckbox); settingsToolbarLeft.appendToolbarItem(this._hideNetworkMessagesCheckbox);
settingsToolbarLeft.appendToolbarItem(this._preserveLogCheckbox); settingsToolbarLeft.appendToolbarItem(this._preserveLogCheckbox);
settingsToolbarLeft.appendToolbarItem(filterByExecutionContextCheckbox); settingsToolbarLeft.appendToolbarItem(filterByExecutionContextCheckbox);
if (!isLogManagementEnabled)
settingsToolbarLeft.appendToolbarItem(filterConsoleAPICheckbox);
var settingsToolbarRight = new UI.Toolbar('', settingsPane.element); var settingsToolbarRight = new UI.Toolbar('', settingsPane.element);
settingsToolbarRight.makeVertical(); settingsToolbarRight.makeVertical();
...@@ -1193,13 +1183,11 @@ Console.ConsoleViewFilter = class { ...@@ -1193,13 +1183,11 @@ Console.ConsoleViewFilter = class {
this._messageLevelFiltersSetting = Console.ConsoleViewFilter.levelFilterSetting(); this._messageLevelFiltersSetting = Console.ConsoleViewFilter.levelFilterSetting();
this._hideNetworkMessagesSetting = Common.moduleSetting('hideNetworkMessages'); this._hideNetworkMessagesSetting = Common.moduleSetting('hideNetworkMessages');
this._filterByExecutionContextSetting = Common.moduleSetting('selectedContextFilterEnabled'); this._filterByExecutionContextSetting = Common.moduleSetting('selectedContextFilterEnabled');
this._filterByConsoleAPISetting = Common.moduleSetting('consoleAPIFilterEnabled');
this._messageURLFiltersSetting.addChangeListener(this._onFilterChanged.bind(this)); this._messageURLFiltersSetting.addChangeListener(this._onFilterChanged.bind(this));
this._messageLevelFiltersSetting.addChangeListener(this._onFilterChanged.bind(this)); this._messageLevelFiltersSetting.addChangeListener(this._onFilterChanged.bind(this));
this._hideNetworkMessagesSetting.addChangeListener(this._onFilterChanged.bind(this)); this._hideNetworkMessagesSetting.addChangeListener(this._onFilterChanged.bind(this));
this._filterByExecutionContextSetting.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); UI.context.addFlavorChangeListener(SDK.ExecutionContext, this._onFilterChanged, this);
var filterKeys = Object.values(Console.ConsoleFilter.FilterType); var filterKeys = Object.values(Console.ConsoleFilter.FilterType);
...@@ -1265,14 +1253,6 @@ Console.ConsoleViewFilter = class { ...@@ -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 blockedURLs = Object.keys(this._messageURLFiltersSetting.get());
var urlFilters = blockedURLs.map(url => ({key: Console.ConsoleFilter.FilterType.Url, text: url, negative: true})); var urlFilters = blockedURLs.map(url => ({key: Console.ConsoleFilter.FilterType.Url, text: url, negative: true}));
parsedFilters = parsedFilters.concat(urlFilters); parsedFilters = parsedFilters.concat(urlFilters);
...@@ -1385,7 +1365,6 @@ Console.ConsoleViewFilter = class { ...@@ -1385,7 +1365,6 @@ Console.ConsoleViewFilter = class {
this._messageURLFiltersSetting.set({}); this._messageURLFiltersSetting.set({});
this._messageLevelFiltersSetting.set(Console.ConsoleFilter.defaultLevelsFilterValue()); this._messageLevelFiltersSetting.set(Console.ConsoleFilter.defaultLevelsFilterValue());
this._filterByExecutionContextSetting.set(false); this._filterByExecutionContextSetting.set(false);
this._filterByConsoleAPISetting.set(false);
this._hideNetworkMessagesSetting.set(false); this._hideNetworkMessagesSetting.set(false);
this._textFilterUI.setValue(''); this._textFilterUI.setValue('');
this._onFilterChanged(); this._onFilterChanged();
......
...@@ -96,25 +96,6 @@ ...@@ -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", "type": "setting",
"category": "Console", "category": "Console",
......
...@@ -111,16 +111,13 @@ Main.Main = class { ...@@ -111,16 +111,13 @@ Main.Main = class {
_initializeExperiments() { _initializeExperiments() {
// Keep this sorted alphabetically: both keys and values. // 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('applyCustomStylesheet', 'Allow custom UI themes');
Runtime.experiments.register('blackboxJSFramesOnTimeline', 'Blackbox JavaScript frames on Timeline', true); 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('colorContrastRatio', 'Color contrast ratio line in color picker', true);
Runtime.experiments.register('emptySourceMapAutoStepping', 'Empty sourcemap auto-stepping'); Runtime.experiments.register('emptySourceMapAutoStepping', 'Empty sourcemap auto-stepping');
Runtime.experiments.register('inputEventsOnTimelineOverview', 'Input events on Timeline overview', true); Runtime.experiments.register('inputEventsOnTimelineOverview', 'Input events on Timeline overview', true);
Runtime.experiments.register('oopifInlineDOM', 'OOPIF: inline DOM ', 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('nativeHeapProfiler', 'Native memory sampling heap profiler', true);
Runtime.experiments.register('performanceMonitor', 'Performance Monitor', true);
Runtime.experiments.register('sourceDiff', 'Source diff'); Runtime.experiments.register('sourceDiff', 'Source diff');
Runtime.experiments.register( Runtime.experiments.register(
'stepIntoAsync', 'Introduce separate step action, stepInto becomes powerful enough to go inside async call'); 'stepIntoAsync', 'Introduce separate step action, stepInto becomes powerful enough to go inside async call');
...@@ -143,18 +140,12 @@ Main.Main = class { ...@@ -143,18 +140,12 @@ Main.Main = class {
if (Host.isUnderTest()) { if (Host.isUnderTest()) {
var testPath = Runtime.queryParam('test'); var testPath = Runtime.queryParam('test');
// Enable experiments for testing. // 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) if (testPath.indexOf('oopif/') !== -1)
Runtime.experiments.enableForTest('oopifInlineDOM'); Runtime.experiments.enableForTest('oopifInlineDOM');
} }
Runtime.experiments.setDefaultExperiments([ Runtime.experiments.setDefaultExperiments(
'accessibilityInspection', 'colorContrastRatio', 'logManagement', 'performanceMonitor', 'stepIntoAsync', ['colorContrastRatio', 'stepIntoAsync', 'timelineKeepHistory', 'oopifInlineDOM']);
'timelineKeepHistory', 'oopifInlineDOM'
]);
} }
/** /**
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
"persistence": "closeable", "persistence": "closeable",
"order": 100, "order": 100,
"className": "Timeline.PerformanceMonitor", "className": "Timeline.PerformanceMonitor",
"experiment": "performanceMonitor",
"tags": "performance, system monitor, monitor, activity, metrics" "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