chrome-devtools-frontend 1.0.952865 → 1.0.954086

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/config/gni/devtools_grd_files.gni +4 -0
  2. package/config/gni/devtools_image_files.gni +1 -0
  3. package/front_end/.eslintrc.js +1 -0
  4. package/front_end/Images/src/info-icon.svg +1 -0
  5. package/front_end/core/common/ParsedURL.ts +31 -0
  6. package/front_end/core/host/UserMetrics.ts +515 -481
  7. package/front_end/core/i18n/i18nImpl.ts +8 -30
  8. package/front_end/core/i18n/locales/en-US.json +48 -0
  9. package/front_end/core/i18n/locales/en-XL.json +48 -0
  10. package/front_end/core/platform/number-utilities.ts +5 -7
  11. package/front_end/core/platform/string-utilities.ts +45 -25
  12. package/front_end/core/sdk/ChildTargetManager.ts +1 -0
  13. package/front_end/core/sdk/PageResourceLoader.ts +1 -2
  14. package/front_end/core/sdk/ResourceTreeModel.ts +12 -2
  15. package/front_end/generated/InspectorBackendCommands.js +3 -1
  16. package/front_end/generated/protocol.d.ts +19 -0
  17. package/front_end/models/extensions/ExtensionServer.ts +2 -3
  18. package/front_end/panels/application/components/BackForwardCacheStrings.ts +93 -15
  19. package/front_end/panels/application/components/EndpointsGrid.ts +1 -1
  20. package/front_end/panels/elements/components/AdornerSettingsPane.ts +2 -1
  21. package/front_end/panels/elements/components/LayoutPane.ts +2 -0
  22. package/front_end/panels/elements/components/elementsBreadcrumbs.css +2 -0
  23. package/front_end/panels/elements/layoutPane.css +0 -4
  24. package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +2 -0
  25. package/front_end/panels/network/NetworkDataGridNode.ts +0 -2
  26. package/front_end/panels/network/components/WebBundleInfoView.ts +1 -1
  27. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -1
  28. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +188 -185
  29. package/front_end/third_party/lighthouse/locales/en-US.json +1 -1
  30. package/front_end/third_party/lighthouse/locales/en-XL.json +1 -1
  31. package/front_end/third_party/lighthouse/report/bundle.js +3 -3
  32. package/front_end/third_party/lighthouse/report-assets/report-generator.js +1 -1
  33. package/front_end/third_party/puppeteer/package/README.md +11 -11
  34. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +2 -2
  35. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -1
  36. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts +2 -0
  37. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
  38. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js +20 -11
  39. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
  40. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
  41. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +13 -3
  42. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
  43. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +2 -2
  44. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -1
  45. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +2 -0
  46. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
  47. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +20 -11
  48. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
  49. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
  50. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +13 -3
  51. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
  52. package/front_end/third_party/puppeteer/package/lib/types.d.ts +2 -0
  53. package/front_end/third_party/puppeteer/package/package.json +1 -1
  54. package/front_end/ui/components/docs/component_docs.ts +4 -4
  55. package/front_end/ui/components/docs/component_docs_styles.css +51 -0
  56. package/front_end/ui/components/input/checkbox.css +11 -0
  57. package/front_end/ui/components/input/input.ts +3 -3
  58. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +2 -1
  59. package/front_end/ui/components/markdown_view/MarkdownView.ts +1 -1
  60. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +2 -1
  61. package/front_end/ui/components/settings/SettingCheckbox.ts +2 -1
  62. package/front_end/ui/components/settings/settingCheckbox.css +0 -5
  63. package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +10 -3
  64. package/front_end/ui/legacy/UIUtils.ts +0 -12
  65. package/front_end/ui/legacy/themeColors.css +1 -0
  66. package/inspector_overlay/main.ts +2 -16
  67. package/package.json +1 -1
  68. package/scripts/check_experiments.js +3 -6
  69. package/scripts/component_server/server.js +4 -12
  70. package/scripts/eslint_rules/lib/check_enumerated_histograms.js +32 -0
  71. package/scripts/eslint_rules/lib/lit_html_host_this.js +1 -10
  72. package/scripts/eslint_rules/lib/utils.js +20 -1
  73. package/scripts/eslint_rules/tests/check_enumerated_histograms_test.js +32 -0
  74. package/scripts/eslint_rules/tests/utils_test.js +30 -0
@@ -42,9 +42,8 @@ export class UserMetrics {
42
42
  }
43
43
 
44
44
  panelShown(panelName: string): void {
45
- const code = PanelCodes[panelName] || 0;
46
- const size = Object.keys(PanelCodes).length + 1;
47
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelShown, code, size);
45
+ const code = PanelCodes[panelName as keyof typeof PanelCodes] || 0;
46
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelShown, code, PanelCodes.MaxValue);
48
47
  // Store that the user has changed the panel so we know launch histograms should not be fired.
49
48
  this.#panelChangedSinceLaunch = true;
50
49
  }
@@ -53,17 +52,16 @@ export class UserMetrics {
53
52
  * Fired when a panel is closed (regardless if it exists in the main panel or the drawer)
54
53
  */
55
54
  panelClosed(panelName: string): void {
56
- const code = PanelCodes[panelName] || 0;
57
- const size = Object.keys(PanelCodes).length + 1;
58
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelClosed, code, size);
55
+ const code = PanelCodes[panelName as keyof typeof PanelCodes] || 0;
56
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelClosed, code, PanelCodes.MaxValue);
59
57
  // Store that the user has changed the panel so we know launch histograms should not be fired.
60
58
  this.#panelChangedSinceLaunch = true;
61
59
  }
62
60
 
63
61
  sidebarPaneShown(sidebarPaneName: string): void {
64
- const code = SidebarPaneCodes[sidebarPaneName] || 0;
65
- const size = Object.keys(SidebarPaneCodes).length + 1;
66
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.SidebarPaneShown, code, size);
62
+ const code = SidebarPaneCodes[sidebarPaneName as keyof typeof SidebarPaneCodes] || 0;
63
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(
64
+ EnumeratedHistogram.SidebarPaneShown, code, SidebarPaneCodes.MaxValue);
67
65
  }
68
66
 
69
67
  settingsPanelShown(settingsViewId: string): void {
@@ -71,8 +69,7 @@ export class UserMetrics {
71
69
  }
72
70
 
73
71
  actionTaken(action: Action): void {
74
- const size = Object.keys(Action).length + 1;
75
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.ActionTaken, action, size);
72
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.ActionTaken, action, Action.MaxValue);
76
73
  }
77
74
 
78
75
  panelLoaded(panelName: string, histogramName: string): void {
@@ -104,21 +101,21 @@ export class UserMetrics {
104
101
  }
105
102
 
106
103
  keybindSetSettingChanged(keybindSet: string): void {
107
- const size = Object.keys(KeybindSetSettings).length + 1;
108
- const value = KeybindSetSettings[keybindSet] || 0;
109
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.KeybindSetSettingChanged, value, size);
104
+ const value = KeybindSetSettings[keybindSet as keyof typeof KeybindSetSettings] || 0;
105
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(
106
+ EnumeratedHistogram.KeybindSetSettingChanged, value, KeybindSetSettings.MaxValue);
110
107
  }
111
108
 
112
109
  keyboardShortcutFired(actionId: string): void {
113
- const size = Object.keys(KeyboardShortcutAction).length + 1;
114
- const action = KeyboardShortcutAction[actionId] || KeyboardShortcutAction.OtherShortcut;
115
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.KeyboardShortcutFired, action, size);
110
+ const action =
111
+ KeyboardShortcutAction[actionId as keyof typeof KeyboardShortcutAction] || KeyboardShortcutAction.OtherShortcut;
112
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(
113
+ EnumeratedHistogram.KeyboardShortcutFired, action, KeyboardShortcutAction.MaxValue);
116
114
  }
117
115
 
118
116
  issuesPanelOpenedFrom(issueOpener: IssueOpener): void {
119
- const size = Object.keys(IssueOpener).length + 1;
120
117
  InspectorFrontendHostInstance.recordEnumeratedHistogram(
121
- EnumeratedHistogram.IssuesPanelOpenedFrom, issueOpener, size);
118
+ EnumeratedHistogram.IssuesPanelOpenedFrom, issueOpener, IssueOpener.MaxValue);
122
119
  }
123
120
 
124
121
  issuesPanelIssueExpanded(issueExpandedCategory: string|undefined): void {
@@ -126,111 +123,105 @@ export class UserMetrics {
126
123
  return;
127
124
  }
128
125
 
129
- const size = Object.keys(IssueExpanded).length + 1;
130
- const issueExpanded = IssueExpanded[issueExpandedCategory];
126
+ const issueExpanded = IssueExpanded[issueExpandedCategory as keyof typeof IssueExpanded];
131
127
 
132
128
  if (issueExpanded === undefined) {
133
129
  return;
134
130
  }
135
131
 
136
132
  InspectorFrontendHostInstance.recordEnumeratedHistogram(
137
- EnumeratedHistogram.IssuesPanelIssueExpanded, issueExpanded, size);
133
+ EnumeratedHistogram.IssuesPanelIssueExpanded, issueExpanded, IssueExpanded.MaxValue);
138
134
  }
139
135
 
140
136
  issuesPanelResourceOpened(issueCategory: string, type: string): void {
141
- const size = Object.keys(IssueResourceOpened).length + 1;
142
137
  const key = issueCategory + type;
143
- const value = IssueResourceOpened[key];
138
+ const value = IssueResourceOpened[key as keyof typeof IssueResourceOpened];
144
139
 
145
140
  if (value === undefined) {
146
141
  return;
147
142
  }
148
143
 
149
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.IssuesPanelResourceOpened, value, size);
144
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(
145
+ EnumeratedHistogram.IssuesPanelResourceOpened, value, IssueResourceOpened.MaxValue);
150
146
  }
151
147
 
152
148
  issueCreated(code: string): void {
153
- const size = Object.keys(IssueCreated).length + 1;
154
- const issueCreated = IssueCreated[code];
149
+ const issueCreated = IssueCreated[code as keyof typeof IssueCreated];
155
150
  if (issueCreated === undefined) {
156
151
  return;
157
152
  }
158
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.IssueCreated, issueCreated, size);
153
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(
154
+ EnumeratedHistogram.IssueCreated, issueCreated, IssueCreated.MaxValue);
159
155
  }
160
156
 
161
157
  experimentEnabledAtLaunch(experimentId: string): void {
162
- const size = DevtoolsExperiments['__lastValidEnumPosition'] + 1;
163
- const experiment = DevtoolsExperiments[experimentId];
158
+ const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];
164
159
  if (experiment === undefined) {
165
160
  return;
166
161
  }
167
162
  InspectorFrontendHostInstance.recordEnumeratedHistogram(
168
- EnumeratedHistogram.ExperimentEnabledAtLaunch, experiment, size);
163
+ EnumeratedHistogram.ExperimentEnabledAtLaunch, experiment, DevtoolsExperiments.MaxValue);
169
164
  }
170
165
 
171
166
  experimentChanged(experimentId: string, isEnabled: boolean): void {
172
- const size = DevtoolsExperiments['__lastValidEnumPosition'] + 1;
173
- const experiment = DevtoolsExperiments[experimentId];
167
+ const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];
174
168
  if (experiment === undefined) {
175
169
  return;
176
170
  }
177
171
  const actionName = isEnabled ? EnumeratedHistogram.ExperimentEnabled : EnumeratedHistogram.ExperimentDisabled;
178
- InspectorFrontendHostInstance.recordEnumeratedHistogram(actionName, experiment, size);
172
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(actionName, experiment, DevtoolsExperiments.MaxValue);
179
173
  }
180
174
 
181
175
  developerResourceLoaded(developerResourceLoaded: DeveloperResourceLoaded): void {
182
- const size = Object.keys(DeveloperResourceLoaded).length + 1;
183
- if (developerResourceLoaded >= size) {
176
+ if (developerResourceLoaded >= DeveloperResourceLoaded.MaxValue) {
184
177
  return;
185
178
  }
186
179
  InspectorFrontendHostInstance.recordEnumeratedHistogram(
187
- EnumeratedHistogram.DeveloperResourceLoaded, developerResourceLoaded, size);
180
+ EnumeratedHistogram.DeveloperResourceLoaded, developerResourceLoaded, DeveloperResourceLoaded.MaxValue);
188
181
  }
189
182
 
190
183
  developerResourceScheme(developerResourceScheme: DeveloperResourceScheme): void {
191
- const size = Object.keys(DeveloperResourceScheme).length + 1;
192
- if (developerResourceScheme >= size) {
184
+ if (developerResourceScheme >= DeveloperResourceScheme.MaxValue) {
193
185
  return;
194
186
  }
195
187
  InspectorFrontendHostInstance.recordEnumeratedHistogram(
196
- EnumeratedHistogram.DeveloperResourceScheme, developerResourceScheme, size);
188
+ EnumeratedHistogram.DeveloperResourceScheme, developerResourceScheme, DeveloperResourceScheme.MaxValue);
197
189
  }
198
190
 
199
191
  linearMemoryInspectorRevealedFrom(linearMemoryInspectorRevealedFrom: LinearMemoryInspectorRevealedFrom): void {
200
- const size = Object.keys(LinearMemoryInspectorRevealedFrom).length + 1;
201
- if (linearMemoryInspectorRevealedFrom >= size) {
192
+ if (linearMemoryInspectorRevealedFrom >= LinearMemoryInspectorRevealedFrom.MaxValue) {
202
193
  return;
203
194
  }
204
195
  InspectorFrontendHostInstance.recordEnumeratedHistogram(
205
- EnumeratedHistogram.LinearMemoryInspectorRevealedFrom, linearMemoryInspectorRevealedFrom, size);
196
+ EnumeratedHistogram.LinearMemoryInspectorRevealedFrom, linearMemoryInspectorRevealedFrom,
197
+ LinearMemoryInspectorRevealedFrom.MaxValue);
206
198
  }
207
199
 
208
200
  linearMemoryInspectorTarget(linearMemoryInspectorTarget: LinearMemoryInspectorTarget): void {
209
- const size = Object.keys(LinearMemoryInspectorTarget).length + 1;
210
- if (linearMemoryInspectorTarget >= size) {
201
+ if (linearMemoryInspectorTarget >= LinearMemoryInspectorTarget.MaxValue) {
211
202
  return;
212
203
  }
213
204
  InspectorFrontendHostInstance.recordEnumeratedHistogram(
214
- EnumeratedHistogram.LinearMemoryInspectorTarget, linearMemoryInspectorTarget, size);
205
+ EnumeratedHistogram.LinearMemoryInspectorTarget, linearMemoryInspectorTarget,
206
+ LinearMemoryInspectorTarget.MaxValue);
215
207
  }
216
208
 
217
209
  language(language: Intl.UnicodeBCP47LocaleIdentifier): void {
218
- const size = Object.keys(Language).length + 1;
219
- const languageCode = Language[language];
210
+ const languageCode = Language[language as keyof typeof Language];
220
211
  if (languageCode === undefined) {
221
212
  return;
222
213
  }
223
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.Language, languageCode, size);
214
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(
215
+ EnumeratedHistogram.Language, languageCode, Language.MaxValue);
224
216
  }
225
217
 
226
218
  showCorsErrorsSettingChanged(show: boolean): void {
219
+ const consoleShowsCorsErrors = ConsoleShowsCorsErrors[String(show) as keyof typeof ConsoleShowsCorsErrors];
227
220
  InspectorFrontendHostInstance.recordEnumeratedHistogram(
228
- EnumeratedHistogram.ConsoleShowsCorsErrors, Number(show), 2);
221
+ EnumeratedHistogram.ConsoleShowsCorsErrors, consoleShowsCorsErrors, ConsoleShowsCorsErrors.MaxValue);
229
222
  }
230
223
 
231
224
  syncSetting(devtoolsSyncSettingEnabled: boolean): void {
232
- const size = Object.keys(SyncSetting).length + 1;
233
-
234
225
  InspectorFrontendHostInstance.getSyncInformation(syncInfo => {
235
226
  let settingValue = SyncSetting.ChromeSyncDisabled;
236
227
  if (syncInfo.isSyncActive && !syncInfo.arePreferencesSynced) {
@@ -240,40 +231,52 @@ export class UserMetrics {
240
231
  SyncSetting.DevToolsSyncSettingDisabled;
241
232
  }
242
233
 
243
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.SyncSetting, settingValue, size);
234
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(
235
+ EnumeratedHistogram.SyncSetting, settingValue, SyncSetting.MaxValue);
244
236
  });
245
237
  }
246
238
 
247
239
  recordingToggled(value: RecordingToggled): void {
248
- const size = Object.keys(RecordingToggled).length + 1;
249
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.RecordingToggled, value, size);
240
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(
241
+ EnumeratedHistogram.RecordingToggled, value, RecordingToggled.MaxValue);
250
242
  }
251
243
 
252
244
  recordingReplayFinished(value: RecordingReplayFinished): void {
253
- const size = Object.keys(RecordingReplayFinished).length + 1;
254
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.RecordingReplayFinished, value, size);
245
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(
246
+ EnumeratedHistogram.RecordingReplayFinished, value, RecordingReplayFinished.MaxValue);
255
247
  }
256
248
 
257
249
  recordingReplayStarted(value: RecordingReplayStarted): void {
258
- const size = Object.keys(RecordingReplayStarted).length + 1;
259
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.RecordingReplayStarted, value, size);
250
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(
251
+ EnumeratedHistogram.RecordingReplayStarted, value, RecordingReplayStarted.MaxValue);
260
252
  }
261
253
 
262
254
  recordingEdited(value: RecordingEdited): void {
263
- const size = Object.keys(RecordingEdited).length + 1;
264
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.RecordingEdited, value, size);
255
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(
256
+ EnumeratedHistogram.RecordingEdited, value, RecordingEdited.MaxValue);
265
257
  }
266
258
 
267
259
  recordingExported(value: RecordingExported): void {
268
- const size = Object.keys(RecordingExported).length + 1;
269
- InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.RecordingExported, value, size);
260
+ InspectorFrontendHostInstance.recordEnumeratedHistogram(
261
+ EnumeratedHistogram.RecordingExported, value, RecordingExported.MaxValue);
270
262
  }
271
263
  }
272
264
 
265
+ /**
266
+ * The numeric enum values are not necessarily continuous! It is possible that
267
+ * values have been removed, which results in gaps in the sequence of values.
268
+ * When adding a new value:
269
+ * 1. Add an entry to the bottom of the enum before 'MaxValue'.
270
+ * 2. Set the value of the new entry to the current value of 'MaxValue'.
271
+ * 2. Increment the value of 'MaxValue' by 1.
272
+ * When removing a value which is no longer needed:
273
+ * 1. Delete the line with the unneeded value
274
+ * 2. Do not update any 'MaxValue' or any other value.
275
+ */
276
+
273
277
  // Codes below are used to collect UMA histograms in the Chromium port.
274
278
  // Do not change the values below, additional actions are needed on the Chromium side
275
279
  // in order to add more codes.
276
-
277
280
  // TODO(crbug.com/1167717): Make this a const enum again
278
281
  // eslint-disable-next-line rulesdir/const_enum
279
282
  export enum Action {
@@ -283,8 +286,6 @@ export enum Action {
283
286
  TimelineStarted = 4,
284
287
  ProfilesCPUProfileTaken = 5,
285
288
  ProfilesHeapProfileTaken = 6,
286
- // Keep key around because length of object is important. See Host.UserMetrics.actionTaken.
287
- 'LegacyAuditsStarted-deprecated' = 7,
288
289
  ConsoleEvaluated = 8,
289
290
  FileSavedInWorkspace = 9,
290
291
  DeviceModeEnabled = 10,
@@ -333,192 +334,196 @@ export enum Action {
333
334
  ConsoleSidebarOpened = 53,
334
335
  PerfPanelTraceImported = 54,
335
336
  PerfPanelTraceExported = 55,
337
+ MaxValue = 56,
338
+ }
339
+
340
+ /* eslint-disable @typescript-eslint/naming-convention */
341
+ // TODO(crbug.com/1167717): Make this a const enum again
342
+ // eslint-disable-next-line rulesdir/const_enum
343
+ export enum PanelCodes {
344
+ elements = 1,
345
+ resources = 2,
346
+ network = 3,
347
+ sources = 4,
348
+ timeline = 5,
349
+ heap_profiler = 6,
350
+ console = 8,
351
+ layers = 9,
352
+ 'console-view' = 10,
353
+ 'animations' = 11,
354
+ 'network.config' = 12,
355
+ 'rendering' = 13,
356
+ 'sensors' = 14,
357
+ 'sources.search' = 15,
358
+ security = 16,
359
+ js_profiler = 17,
360
+ lighthouse = 18,
361
+ 'coverage' = 19,
362
+ 'protocol-monitor' = 20,
363
+ 'remote-devices' = 21,
364
+ 'web-audio' = 22,
365
+ 'changes.changes' = 23,
366
+ 'performance.monitor' = 24,
367
+ 'release-note' = 25,
368
+ 'live_heap_profile' = 26,
369
+ 'sources.quick' = 27,
370
+ 'network.blocked-urls' = 28,
371
+ 'settings-preferences' = 29,
372
+ 'settings-workspace' = 30,
373
+ 'settings-experiments' = 31,
374
+ 'settings-blackbox' = 32,
375
+ 'settings-devices' = 33,
376
+ 'settings-throttling-conditions' = 34,
377
+ 'settings-emulation-locations' = 35,
378
+ 'settings-shortcuts' = 36,
379
+ 'issues-pane' = 37,
380
+ 'settings-keybinds' = 38,
381
+ 'cssoverview' = 39,
382
+ 'chrome_recorder' = 40,
383
+ MaxValue = 41,
384
+ }
385
+ /* eslint-enable @typescript-eslint/naming-convention */
386
+
387
+ /* eslint-disable @typescript-eslint/naming-convention */
388
+ // TODO(crbug.com/1167717): Make this a const enum again
389
+ // eslint-disable-next-line rulesdir/const_enum
390
+ export enum SidebarPaneCodes {
391
+ 'OtherSidebarPane' = 0,
392
+ 'Styles' = 1,
393
+ 'Computed' = 2,
394
+ 'elements.layout' = 3,
395
+ 'elements.eventListeners' = 4,
396
+ 'elements.domBreakpoints' = 5,
397
+ 'elements.domProperties' = 6,
398
+ 'accessibility.view' = 7,
399
+ MaxValue = 8,
400
+ }
401
+ /* eslint-enable @typescript-eslint/naming-convention */
402
+
403
+ /* eslint-disable @typescript-eslint/naming-convention */
404
+ // TODO(crbug.com/1167717): Make this a const enum again
405
+ // eslint-disable-next-line rulesdir/const_enum
406
+ export enum KeybindSetSettings {
407
+ 'devToolsDefault' = 0,
408
+ 'vsCode' = 1,
409
+ MaxValue = 2,
336
410
  }
411
+ /* eslint-enable @typescript-eslint/naming-convention */
337
412
 
338
- export const ContrastThresholds: {
339
- [x: string]: number,
340
- } = {
341
- aa: 0,
342
- aaa: 1,
343
- };
344
-
345
- export const PanelCodes: {
346
- [x: string]: number,
347
- } = {
348
- elements: 1,
349
- resources: 2,
350
- network: 3,
351
- sources: 4,
352
- timeline: 5,
353
- heap_profiler: 6,
354
- // Keep key around because length of object is important. See Host.UserMetrics.panelShown.
355
- 'legacy-audits-deprecated': 7,
356
- console: 8,
357
- layers: 9,
358
- 'console-view': 10,
359
- 'animations': 11,
360
- 'network.config': 12,
361
- 'rendering': 13,
362
- 'sensors': 14,
363
- 'sources.search': 15,
364
- security: 16,
365
- js_profiler: 17,
366
- lighthouse: 18,
367
- 'coverage': 19,
368
- 'protocol-monitor': 20,
369
- 'remote-devices': 21,
370
- 'web-audio': 22,
371
- 'changes.changes': 23,
372
- 'performance.monitor': 24,
373
- 'release-note': 25,
374
- 'live_heap_profile': 26,
375
- 'sources.quick': 27,
376
- 'network.blocked-urls': 28,
377
- 'settings-preferences': 29,
378
- 'settings-workspace': 30,
379
- 'settings-experiments': 31,
380
- 'settings-blackbox': 32,
381
- 'settings-devices': 33,
382
- 'settings-throttling-conditions': 34,
383
- 'settings-emulation-locations': 35,
384
- 'settings-shortcuts': 36,
385
- 'issues-pane': 37,
386
- 'settings-keybinds': 38,
387
- 'cssoverview': 39,
388
- 'chrome_recorder': 40,
389
- };
390
-
391
- export const SidebarPaneCodes: {
392
- [x: string]: number,
393
- } = {
394
- 'OtherSidebarPane': 0,
395
- 'Styles': 1,
396
- 'Computed': 2,
397
- 'elements.layout': 3,
398
- 'elements.eventListeners': 4,
399
- 'elements.domBreakpoints': 5,
400
- 'elements.domProperties': 6,
401
- 'accessibility.view': 7,
402
- };
403
-
404
- export const KeybindSetSettings: {
405
- [x: string]: number,
406
- } = {
407
- 'devToolsDefault': 0,
408
- 'vsCode': 1,
409
- };
410
-
411
- export const KeyboardShortcutAction: {
412
- [x: string]: number,
413
- } = {
414
- OtherShortcut: 0,
415
- 'commandMenu.show': 1,
416
- 'console.clear': 2,
417
- 'console.show': 3,
418
- 'debugger.step': 4,
419
- 'debugger.step-into': 5,
420
- 'debugger.step-out': 6,
421
- 'debugger.step-over': 7,
422
- 'debugger.toggle-breakpoint': 8,
423
- 'debugger.toggle-breakpoint-enabled': 9,
424
- 'debugger.toggle-pause': 10,
425
- 'elements.edit-as-html': 11,
426
- 'elements.hide-element': 12,
427
- 'elements.redo': 13,
428
- 'elements.toggle-element-search': 14,
429
- 'elements.undo': 15,
430
- 'main.search-in-panel.find': 16,
431
- 'main.toggle-drawer': 17,
432
- 'network.hide-request-details': 18,
433
- 'network.search': 19,
434
- 'network.toggle-recording': 20,
435
- 'quickOpen.show': 21,
436
- 'settings.show': 22,
437
- 'sources.search': 23,
438
- 'background-service.toggle-recording': 24,
439
- 'components.collect-garbage': 25,
440
- 'console.clear.history': 26,
441
- 'console.create-pin': 27,
442
- 'coverage.start-with-reload': 28,
443
- 'coverage.toggle-recording': 29,
444
- 'debugger.breakpoint-input-window': 30,
445
- 'debugger.evaluate-selection': 31,
446
- 'debugger.next-call-frame': 32,
447
- 'debugger.previous-call-frame': 33,
448
- 'debugger.run-snippet': 34,
449
- 'debugger.toggle-breakpoints-active': 35,
450
- 'elements.capture-area-screenshot': 36,
451
- 'emulation.capture-full-height-screenshot': 37,
452
- 'emulation.capture-node-screenshot': 38,
453
- 'emulation.capture-screenshot': 39,
454
- 'emulation.show-sensors': 40,
455
- 'emulation.toggle-device-mode': 41,
456
- 'help.release-notes': 42,
457
- 'help.report-issue': 43,
458
- 'input.start-replaying': 44,
459
- 'input.toggle-pause': 45,
460
- 'input.toggle-recording': 46,
461
- 'inspector_main.focus-debuggee': 47,
462
- 'inspector_main.hard-reload': 48,
463
- 'inspector_main.reload': 49,
464
- 'live-heap-profile.start-with-reload': 50,
465
- 'live-heap-profile.toggle-recording': 51,
466
- 'main.debug-reload': 52,
467
- 'main.next-tab': 53,
468
- 'main.previous-tab': 54,
469
- 'main.search-in-panel.cancel': 55,
470
- 'main.search-in-panel.find-next': 56,
471
- 'main.search-in-panel.find-previous': 57,
472
- 'main.toggle-dock': 58,
473
- 'main.zoom-in': 59,
474
- 'main.zoom-out': 60,
475
- 'main.zoom-reset': 61,
476
- 'network-conditions.network-low-end-mobile': 62,
477
- 'network-conditions.network-mid-tier-mobile': 63,
478
- 'network-conditions.network-offline': 64,
479
- 'network-conditions.network-online': 65,
480
- 'profiler.heap-toggle-recording': 66,
481
- 'profiler.js-toggle-recording': 67,
482
- 'resources.clear': 68,
483
- 'settings.documentation': 69,
484
- 'settings.shortcuts': 70,
485
- 'sources.add-folder-to-workspace': 71,
486
- 'sources.add-to-watch': 72,
487
- 'sources.close-all': 73,
488
- 'sources.close-editor-tab': 74,
489
- 'sources.create-snippet': 75,
490
- 'sources.go-to-line': 76,
491
- 'sources.go-to-member': 77,
492
- 'sources.jump-to-next-location': 78,
493
- 'sources.jump-to-previous-location': 79,
494
- 'sources.rename': 80,
495
- 'sources.save': 81,
496
- 'sources.save-all': 82,
497
- 'sources.switch-file': 83,
498
- 'timeline.jump-to-next-frame': 84,
499
- 'timeline.jump-to-previous-frame': 85,
500
- 'timeline.load-from-file': 86,
501
- 'timeline.next-recording': 87,
502
- 'timeline.previous-recording': 88,
503
- 'timeline.record-reload': 89,
504
- 'timeline.save-to-file': 90,
505
- 'timeline.show-history': 91,
506
- 'timeline.toggle-recording': 92,
507
- 'sources.increment-css': 93,
508
- 'sources.increment-css-by-ten': 94,
509
- 'sources.decrement-css': 95,
510
- 'sources.decrement-css-by-ten': 96,
511
- 'layers.reset-view': 97,
512
- 'layers.pan-mode': 98,
513
- 'layers.rotate-mode': 99,
514
- 'layers.zoom-in': 100,
515
- 'layers.zoom-out': 101,
516
- 'layers.up': 102,
517
- 'layers.down': 103,
518
- 'layers.left': 104,
519
- 'layers.right': 105,
520
- 'help.report-translation-issue': 106,
521
- };
413
+ /* eslint-disable @typescript-eslint/naming-convention */
414
+ // TODO(crbug.com/1167717): Make this a const enum again
415
+ // eslint-disable-next-line rulesdir/const_enum
416
+ export enum KeyboardShortcutAction {
417
+ OtherShortcut = 0,
418
+ 'commandMenu.show' = 1,
419
+ 'console.clear' = 2,
420
+ 'console.show' = 3,
421
+ 'debugger.step' = 4,
422
+ 'debugger.step-into' = 5,
423
+ 'debugger.step-out' = 6,
424
+ 'debugger.step-over' = 7,
425
+ 'debugger.toggle-breakpoint' = 8,
426
+ 'debugger.toggle-breakpoint-enabled' = 9,
427
+ 'debugger.toggle-pause' = 10,
428
+ 'elements.edit-as-html' = 11,
429
+ 'elements.hide-element' = 12,
430
+ 'elements.redo' = 13,
431
+ 'elements.toggle-element-search' = 14,
432
+ 'elements.undo' = 15,
433
+ 'main.search-in-panel.find' = 16,
434
+ 'main.toggle-drawer' = 17,
435
+ 'network.hide-request-details' = 18,
436
+ 'network.search' = 19,
437
+ 'network.toggle-recording' = 20,
438
+ 'quickOpen.show' = 21,
439
+ 'settings.show' = 22,
440
+ 'sources.search' = 23,
441
+ 'background-service.toggle-recording' = 24,
442
+ 'components.collect-garbage' = 25,
443
+ 'console.clear.history' = 26,
444
+ 'console.create-pin' = 27,
445
+ 'coverage.start-with-reload' = 28,
446
+ 'coverage.toggle-recording' = 29,
447
+ 'debugger.breakpoint-input-window' = 30,
448
+ 'debugger.evaluate-selection' = 31,
449
+ 'debugger.next-call-frame' = 32,
450
+ 'debugger.previous-call-frame' = 33,
451
+ 'debugger.run-snippet' = 34,
452
+ 'debugger.toggle-breakpoints-active' = 35,
453
+ 'elements.capture-area-screenshot' = 36,
454
+ 'emulation.capture-full-height-screenshot' = 37,
455
+ 'emulation.capture-node-screenshot' = 38,
456
+ 'emulation.capture-screenshot' = 39,
457
+ 'emulation.show-sensors' = 40,
458
+ 'emulation.toggle-device-mode' = 41,
459
+ 'help.release-notes' = 42,
460
+ 'help.report-issue' = 43,
461
+ 'input.start-replaying' = 44,
462
+ 'input.toggle-pause' = 45,
463
+ 'input.toggle-recording' = 46,
464
+ 'inspector_main.focus-debuggee' = 47,
465
+ 'inspector_main.hard-reload' = 48,
466
+ 'inspector_main.reload' = 49,
467
+ 'live-heap-profile.start-with-reload' = 50,
468
+ 'live-heap-profile.toggle-recording' = 51,
469
+ 'main.debug-reload' = 52,
470
+ 'main.next-tab' = 53,
471
+ 'main.previous-tab' = 54,
472
+ 'main.search-in-panel.cancel' = 55,
473
+ 'main.search-in-panel.find-next' = 56,
474
+ 'main.search-in-panel.find-previous' = 57,
475
+ 'main.toggle-dock' = 58,
476
+ 'main.zoom-in' = 59,
477
+ 'main.zoom-out' = 60,
478
+ 'main.zoom-reset' = 61,
479
+ 'network-conditions.network-low-end-mobile' = 62,
480
+ 'network-conditions.network-mid-tier-mobile' = 63,
481
+ 'network-conditions.network-offline' = 64,
482
+ 'network-conditions.network-online' = 65,
483
+ 'profiler.heap-toggle-recording' = 66,
484
+ 'profiler.js-toggle-recording' = 67,
485
+ 'resources.clear' = 68,
486
+ 'settings.documentation' = 69,
487
+ 'settings.shortcuts' = 70,
488
+ 'sources.add-folder-to-workspace' = 71,
489
+ 'sources.add-to-watch' = 72,
490
+ 'sources.close-all' = 73,
491
+ 'sources.close-editor-tab' = 74,
492
+ 'sources.create-snippet' = 75,
493
+ 'sources.go-to-line' = 76,
494
+ 'sources.go-to-member' = 77,
495
+ 'sources.jump-to-next-location' = 78,
496
+ 'sources.jump-to-previous-location' = 79,
497
+ 'sources.rename' = 80,
498
+ 'sources.save' = 81,
499
+ 'sources.save-all' = 82,
500
+ 'sources.switch-file' = 83,
501
+ 'timeline.jump-to-next-frame' = 84,
502
+ 'timeline.jump-to-previous-frame' = 85,
503
+ 'timeline.load-from-file' = 86,
504
+ 'timeline.next-recording' = 87,
505
+ 'timeline.previous-recording' = 88,
506
+ 'timeline.record-reload' = 89,
507
+ 'timeline.save-to-file' = 90,
508
+ 'timeline.show-history' = 91,
509
+ 'timeline.toggle-recording' = 92,
510
+ 'sources.increment-css' = 93,
511
+ 'sources.increment-css-by-ten' = 94,
512
+ 'sources.decrement-css' = 95,
513
+ 'sources.decrement-css-by-ten' = 96,
514
+ 'layers.reset-view' = 97,
515
+ 'layers.pan-mode' = 98,
516
+ 'layers.rotate-mode' = 99,
517
+ 'layers.zoom-in' = 100,
518
+ 'layers.zoom-out' = 101,
519
+ 'layers.up' = 102,
520
+ 'layers.down' = 103,
521
+ 'layers.left' = 104,
522
+ 'layers.right' = 105,
523
+ 'help.report-translation-issue' = 106,
524
+ MaxValue = 107,
525
+ }
526
+ /* eslint-enable @typescript-eslint/naming-convention */
522
527
 
523
528
  // TODO(crbug.com/1167717): Make this a const enum again
524
529
  // eslint-disable-next-line rulesdir/const_enum
@@ -529,157 +534,161 @@ export enum IssueOpener {
529
534
  HamburgerMenu = 3,
530
535
  Adorner = 4,
531
536
  CommandMenu = 5,
537
+ MaxValue = 6,
532
538
  }
533
539
 
534
540
  /**
535
- * This list should contain the currently active Devtools Experiments.
536
- * Therefore, it is possible that the id's will no longer be continuous
537
- * as experiemnts are removed.
538
- * When adding a new experiemnt:
539
- * 1. Add an entry to the bottom of the list before '__lastValidEnumPosition'
540
- * 2. Set the value of the new entry and '__lastValidEnumPosition' to
541
- * __lastValidEnumPosition + 1
542
- * When removing an experiment, simply delete the line from the enum.
541
+ * This list should contain the currently active Devtools Experiments,
542
+ * gaps are expected.
543
543
  */
544
- export const DevtoolsExperiments: {
545
- [x: string]: number,
546
- } = {
547
- 'applyCustomStylesheet': 0,
548
- 'captureNodeCreationStacks': 1,
549
- 'sourcesPrettyPrint': 2,
550
- 'backgroundServices': 3,
551
- 'backgroundServicesNotifications': 4,
552
- 'backgroundServicesPaymentHandler': 5,
553
- 'backgroundServicesPushMessaging': 6,
554
- 'inputEventsOnTimelineOverview': 10,
555
- 'liveHeapProfile': 11,
556
- 'protocolMonitor': 13,
557
- 'developerResourcesView': 15,
558
- 'recordCoverageWithPerformanceTracing': 16,
559
- 'samplingHeapProfilerTimeline': 17,
560
- 'showOptionToNotTreatGlobalObjectsAsRoots': 18,
561
- 'sourceOrderViewer': 20,
562
- 'webauthnPane': 22,
563
- 'timelineEventInitiators': 24,
564
- 'timelineInvalidationTracking': 26,
565
- 'timelineShowAllEvents': 27,
566
- 'timelineV8RuntimeCallStats': 28,
567
- 'timelineWebGL': 29,
568
- 'timelineReplayEvent': 30,
569
- 'wasmDWARFDebugging': 31,
570
- 'dualScreenSupport': 32,
571
- 'keyboardShortcutEditor': 35,
572
- 'APCA': 39,
573
- 'cspViolationsView': 40,
574
- 'fontEditor': 41,
575
- 'fullAccessibilityTree': 42,
576
- 'ignoreListJSFramesOnTimeline': 43,
577
- 'contrastIssues': 44,
578
- 'experimentalCookieFeatures': 45,
579
- 'hideIssuesFeature': 48,
580
- 'reportingApiDebugging': 49,
581
- 'syncSettings': 50,
582
- 'groupAndHideIssuesByKind': 51,
583
- 'cssTypeComponentLength': 52,
584
- 'preciseChanges': 53,
585
- '__lastValidEnumPosition': 53,
586
- };
587
-
588
- export const IssueExpanded: {
589
- [x: string]: number,
590
- } = {
591
- CrossOriginEmbedderPolicy: 0,
592
- MixedContent: 1,
593
- SameSiteCookie: 2,
594
- HeavyAd: 3,
595
- ContentSecurityPolicy: 4,
596
- Other: 5,
597
- };
598
-
599
- export const IssueResourceOpened: {
600
- [x: string]: number,
601
- } = {
602
- CrossOriginEmbedderPolicyRequest: 0,
603
- CrossOriginEmbedderPolicyElement: 1,
604
- MixedContentRequest: 2,
605
- SameSiteCookieCookie: 3,
606
- SameSiteCookieRequest: 4,
607
- HeavyAdElement: 5,
608
- ContentSecurityPolicyDirective: 6,
609
- ContentSecurityPolicyElement: 7,
610
- CrossOriginEmbedderPolicyLearnMore: 8,
611
- MixedContentLearnMore: 9,
612
- SameSiteCookieLearnMore: 10,
613
- HeavyAdLearnMore: 11,
614
- ContentSecurityPolicyLearnMore: 12,
615
- };
616
-
617
- export const IssueCreated: {
618
- [x: string]: number,
619
- } = {
620
- MixedContentIssue: 0,
621
- 'ContentSecurityPolicyIssue::kInlineViolation': 1,
622
- 'ContentSecurityPolicyIssue::kEvalViolation': 2,
623
- 'ContentSecurityPolicyIssue::kURLViolation': 3,
624
- 'ContentSecurityPolicyIssue::kTrustedTypesSinkViolation': 4,
625
- 'ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation': 5,
626
- 'HeavyAdIssue::NetworkTotalLimit': 6,
627
- 'HeavyAdIssue::CpuTotalLimit': 7,
628
- 'HeavyAdIssue::CpuPeakLimit': 8,
629
- 'CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader': 9,
630
- 'CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage': 10,
631
- 'CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin': 11,
632
- 'CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep': 12,
633
- 'CrossOriginEmbedderPolicyIssue::CorpNotSameSite': 13,
634
- 'SameSiteCookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie': 14,
635
- 'SameSiteCookieIssue::ExcludeSameSiteNoneInsecure::SetCookie': 15,
636
- 'SameSiteCookieIssue::WarnSameSiteNoneInsecure::ReadCookie': 16,
637
- 'SameSiteCookieIssue::WarnSameSiteNoneInsecure::SetCookie': 17,
638
- 'SameSiteCookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure': 18,
639
- 'SameSiteCookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure': 19,
640
- 'SameSiteCookieIssue::WarnCrossDowngrade::ReadCookie::Secure': 20,
641
- 'SameSiteCookieIssue::WarnCrossDowngrade::ReadCookie::Insecure': 21,
642
- 'SameSiteCookieIssue::WarnCrossDowngrade::SetCookie::Secure': 22,
643
- 'SameSiteCookieIssue::WarnCrossDowngrade::SetCookie::Insecure': 23,
644
- 'SameSiteCookieIssue::ExcludeNavigationContextDowngrade::Secure': 24,
645
- 'SameSiteCookieIssue::ExcludeNavigationContextDowngrade::Insecure': 25,
646
- 'SameSiteCookieIssue::ExcludeContextDowngrade::ReadCookie::Secure': 26,
647
- 'SameSiteCookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure': 27,
648
- 'SameSiteCookieIssue::ExcludeContextDowngrade::SetCookie::Secure': 28,
649
- 'SameSiteCookieIssue::ExcludeContextDowngrade::SetCookie::Insecure': 29,
650
- 'SameSiteCookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie': 30,
651
- 'SameSiteCookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie': 31,
652
- 'SameSiteCookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie': 32,
653
- 'SameSiteCookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie': 33,
654
- 'SameSiteCookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie': 34,
655
- 'SameSiteCookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie': 35,
656
- 'SharedArrayBufferIssue::TransferIssue': 36,
657
- 'SharedArrayBufferIssue::CreationIssue': 37,
658
- 'TrustedWebActivityIssue::kHttpError': 38,
659
- 'TrustedWebActivityIssue::kUnavailableOffline': 39,
660
- 'TrustedWebActivityIssue::kDigitalAssetLinks': 40,
661
- LowTextContrastIssue: 41,
662
- 'CorsIssue::InsecurePrivateNetwork': 42,
663
- 'CorsIssue::InvalidHeaders': 44,
664
- 'CorsIssue::WildcardOriginWithCredentials': 45,
665
- 'CorsIssue::PreflightResponseInvalid': 46,
666
- 'CorsIssue::OriginMismatch': 47,
667
- 'CorsIssue::AllowCredentialsRequired': 48,
668
- 'CorsIssue::MethodDisallowedByPreflightResponse': 49,
669
- 'CorsIssue::HeaderDisallowedByPreflightResponse': 50,
670
- 'CorsIssue::RedirectContainsCredentials': 51,
671
- 'CorsIssue::DisallowedByMode': 52,
672
- 'CorsIssue::CorsDisabledScheme': 53,
673
- 'CorsIssue::PreflightMissingAllowExternal': 54,
674
- 'CorsIssue::PreflightInvalidAllowExternal': 55,
675
- 'CorsIssue::InvalidResponse': 56,
676
- 'CorsIssue::NoCorsRedirectModeNotFollow': 57,
677
- 'QuirksModeIssue::QuirksMode': 58,
678
- 'QuirksModeIssue::LimitedQuirksMode': 59,
679
- DeprecationIssue: 60,
680
- 'ClientHintIssue::MetaTagAllowListInvalidOrigin': 61,
681
- 'ClientHintIssue::MetaTagModifiedHTML': 62,
682
- };
544
+ /* eslint-disable @typescript-eslint/naming-convention */
545
+ // TODO(crbug.com/1167717): Make this a const enum again
546
+ // eslint-disable-next-line rulesdir/const_enum
547
+ export enum DevtoolsExperiments {
548
+ 'applyCustomStylesheet' = 0,
549
+ 'captureNodeCreationStacks' = 1,
550
+ 'sourcesPrettyPrint' = 2,
551
+ 'backgroundServices' = 3,
552
+ 'backgroundServicesNotifications' = 4,
553
+ 'backgroundServicesPaymentHandler' = 5,
554
+ 'backgroundServicesPushMessaging' = 6,
555
+ 'inputEventsOnTimelineOverview' = 10,
556
+ 'liveHeapProfile' = 11,
557
+ 'protocolMonitor' = 13,
558
+ 'developerResourcesView' = 15,
559
+ 'recordCoverageWithPerformanceTracing' = 16,
560
+ 'samplingHeapProfilerTimeline' = 17,
561
+ 'showOptionToNotTreatGlobalObjectsAsRoots' = 18,
562
+ 'sourceOrderViewer' = 20,
563
+ 'webauthnPane' = 22,
564
+ 'timelineEventInitiators' = 24,
565
+ 'timelineInvalidationTracking' = 26,
566
+ 'timelineShowAllEvents' = 27,
567
+ 'timelineV8RuntimeCallStats' = 28,
568
+ 'timelineWebGL' = 29,
569
+ 'timelineReplayEvent' = 30,
570
+ 'wasmDWARFDebugging' = 31,
571
+ 'dualScreenSupport' = 32,
572
+ 'keyboardShortcutEditor' = 35,
573
+ 'APCA' = 39,
574
+ 'cspViolationsView' = 40,
575
+ 'fontEditor' = 41,
576
+ 'fullAccessibilityTree' = 42,
577
+ 'ignoreListJSFramesOnTimeline' = 43,
578
+ 'contrastIssues' = 44,
579
+ 'experimentalCookieFeatures' = 45,
580
+ 'hideIssuesFeature' = 48,
581
+ 'reportingApiDebugging' = 49,
582
+ 'syncSettings' = 50,
583
+ 'groupAndHideIssuesByKind' = 51,
584
+ 'cssTypeComponentLength' = 52,
585
+ 'preciseChanges' = 53,
586
+ 'MaxValue' = 54,
587
+ }
588
+ /* eslint-enable @typescript-eslint/naming-convention */
589
+
590
+ // TODO(crbug.com/1167717): Make this a const enum again
591
+ // eslint-disable-next-line rulesdir/const_enum
592
+ export enum IssueExpanded {
593
+ CrossOriginEmbedderPolicy = 0,
594
+ MixedContent = 1,
595
+ SameSiteCookie = 2,
596
+ HeavyAd = 3,
597
+ ContentSecurityPolicy = 4,
598
+ Other = 5,
599
+ MaxValue = 6,
600
+ }
601
+
602
+ // TODO(crbug.com/1167717): Make this a const enum again
603
+ // eslint-disable-next-line rulesdir/const_enum
604
+ export enum IssueResourceOpened {
605
+ CrossOriginEmbedderPolicyRequest = 0,
606
+ CrossOriginEmbedderPolicyElement = 1,
607
+ MixedContentRequest = 2,
608
+ SameSiteCookieCookie = 3,
609
+ SameSiteCookieRequest = 4,
610
+ HeavyAdElement = 5,
611
+ ContentSecurityPolicyDirective = 6,
612
+ ContentSecurityPolicyElement = 7,
613
+ CrossOriginEmbedderPolicyLearnMore = 8,
614
+ MixedContentLearnMore = 9,
615
+ SameSiteCookieLearnMore = 10,
616
+ HeavyAdLearnMore = 11,
617
+ ContentSecurityPolicyLearnMore = 12,
618
+ MaxValue = 13,
619
+ }
620
+
621
+ /**
622
+ * This list should contain the currently active issue types,
623
+ * gaps are expected.
624
+ */
625
+ // TODO(crbug.com/1167717): Make this a const enum again
626
+ // eslint-disable-next-line rulesdir/const_enum
627
+ export enum IssueCreated {
628
+ MixedContentIssue = 0,
629
+ 'ContentSecurityPolicyIssue::kInlineViolation' = 1,
630
+ 'ContentSecurityPolicyIssue::kEvalViolation' = 2,
631
+ 'ContentSecurityPolicyIssue::kURLViolation' = 3,
632
+ 'ContentSecurityPolicyIssue::kTrustedTypesSinkViolation' = 4,
633
+ 'ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation' = 5,
634
+ 'HeavyAdIssue::NetworkTotalLimit' = 6,
635
+ 'HeavyAdIssue::CpuTotalLimit' = 7,
636
+ 'HeavyAdIssue::CpuPeakLimit' = 8,
637
+ 'CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader' = 9,
638
+ 'CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage' = 10,
639
+ 'CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin' = 11,
640
+ 'CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep' = 12,
641
+ 'CrossOriginEmbedderPolicyIssue::CorpNotSameSite' = 13,
642
+ 'SameSiteCookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie' = 14,
643
+ 'SameSiteCookieIssue::ExcludeSameSiteNoneInsecure::SetCookie' = 15,
644
+ 'SameSiteCookieIssue::WarnSameSiteNoneInsecure::ReadCookie' = 16,
645
+ 'SameSiteCookieIssue::WarnSameSiteNoneInsecure::SetCookie' = 17,
646
+ 'SameSiteCookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure' = 18,
647
+ 'SameSiteCookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure' = 19,
648
+ 'SameSiteCookieIssue::WarnCrossDowngrade::ReadCookie::Secure' = 20,
649
+ 'SameSiteCookieIssue::WarnCrossDowngrade::ReadCookie::Insecure' = 21,
650
+ 'SameSiteCookieIssue::WarnCrossDowngrade::SetCookie::Secure' = 22,
651
+ 'SameSiteCookieIssue::WarnCrossDowngrade::SetCookie::Insecure' = 23,
652
+ 'SameSiteCookieIssue::ExcludeNavigationContextDowngrade::Secure' = 24,
653
+ 'SameSiteCookieIssue::ExcludeNavigationContextDowngrade::Insecure' = 25,
654
+ 'SameSiteCookieIssue::ExcludeContextDowngrade::ReadCookie::Secure' = 26,
655
+ 'SameSiteCookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure' = 27,
656
+ 'SameSiteCookieIssue::ExcludeContextDowngrade::SetCookie::Secure' = 28,
657
+ 'SameSiteCookieIssue::ExcludeContextDowngrade::SetCookie::Insecure' = 29,
658
+ 'SameSiteCookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie' = 30,
659
+ 'SameSiteCookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie' = 31,
660
+ 'SameSiteCookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie' = 32,
661
+ 'SameSiteCookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie' = 33,
662
+ 'SameSiteCookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie' = 34,
663
+ 'SameSiteCookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie' = 35,
664
+ 'SharedArrayBufferIssue::TransferIssue' = 36,
665
+ 'SharedArrayBufferIssue::CreationIssue' = 37,
666
+ 'TrustedWebActivityIssue::kHttpError' = 38,
667
+ 'TrustedWebActivityIssue::kUnavailableOffline' = 39,
668
+ 'TrustedWebActivityIssue::kDigitalAssetLinks' = 40,
669
+ LowTextContrastIssue = 41,
670
+ 'CorsIssue::InsecurePrivateNetwork' = 42,
671
+ 'CorsIssue::InvalidHeaders' = 44,
672
+ 'CorsIssue::WildcardOriginWithCredentials' = 45,
673
+ 'CorsIssue::PreflightResponseInvalid' = 46,
674
+ 'CorsIssue::OriginMismatch' = 47,
675
+ 'CorsIssue::AllowCredentialsRequired' = 48,
676
+ 'CorsIssue::MethodDisallowedByPreflightResponse' = 49,
677
+ 'CorsIssue::HeaderDisallowedByPreflightResponse' = 50,
678
+ 'CorsIssue::RedirectContainsCredentials' = 51,
679
+ 'CorsIssue::DisallowedByMode' = 52,
680
+ 'CorsIssue::CorsDisabledScheme' = 53,
681
+ 'CorsIssue::PreflightMissingAllowExternal' = 54,
682
+ 'CorsIssue::PreflightInvalidAllowExternal' = 55,
683
+ 'CorsIssue::NoCorsRedirectModeNotFollow' = 57,
684
+ 'QuirksModeIssue::QuirksMode' = 58,
685
+ 'QuirksModeIssue::LimitedQuirksMode' = 59,
686
+ DeprecationIssue = 60,
687
+ 'ClientHintIssue::MetaTagAllowListInvalidOrigin' = 61,
688
+ 'ClientHintIssue::MetaTagModifiedHTML' = 62,
689
+ 'CorsIssue::PreflightAllowPrivateNetworkError' = 63,
690
+ MaxValue = 64,
691
+ }
683
692
 
684
693
  // TODO(crbug.com/1167717): Make this a const enum again
685
694
  // eslint-disable-next-line rulesdir/const_enum
@@ -692,6 +701,7 @@ export enum DeveloperResourceLoaded {
692
701
  FallbackPerOverride = 5,
693
702
  FallbackPerProtocol = 6,
694
703
  FallbackFailure = 7,
704
+ MaxValue = 8,
695
705
  }
696
706
 
697
707
  // TODO(crbug.com/1167717): Make this a const enum again
@@ -706,6 +716,7 @@ export enum DeveloperResourceScheme {
706
716
  SchemeData = 6,
707
717
  SchemeFile = 7,
708
718
  SchemeBlob = 8,
719
+ MaxValue = 9,
709
720
  }
710
721
 
711
722
  // TODO(crbug.com/1167717): Make this a const enum again
@@ -713,6 +724,7 @@ export enum DeveloperResourceScheme {
713
724
  export enum LinearMemoryInspectorRevealedFrom {
714
725
  ContextMenu = 0,
715
726
  MemoryIcon = 1,
727
+ MaxValue = 2,
716
728
  }
717
729
 
718
730
  // TODO(crbug.com/1167717): Make this a const enum again
@@ -723,92 +735,98 @@ export enum LinearMemoryInspectorTarget {
723
735
  DataView = 2,
724
736
  TypedArray = 3,
725
737
  WebAssemblyMemory = 4,
738
+ MaxValue = 5,
726
739
  }
727
740
 
728
- export const Language: Record<string, number> = {
729
- 'af': 1,
730
- 'am': 2,
731
- 'ar': 3,
732
- 'as': 4,
733
- 'az': 5,
734
- 'be': 6,
735
- 'bg': 7,
736
- 'bn': 8,
737
- 'bs': 9,
738
- 'ca': 10,
739
- 'cs': 11,
740
- 'cy': 12,
741
- 'da': 13,
742
- 'de': 14,
743
- 'el': 15,
744
- 'en-GB': 16,
745
- 'en-US': 17,
746
- 'es-419': 18,
747
- 'es': 19,
748
- 'et': 20,
749
- 'eu': 21,
750
- 'fa': 22,
751
- 'fi': 23,
752
- 'fil': 24,
753
- 'fr-CA': 25,
754
- 'fr': 26,
755
- 'gl': 27,
756
- 'gu': 28,
757
- 'he': 29,
758
- 'hi': 30,
759
- 'hr': 31,
760
- 'hu': 32,
761
- 'hy': 33,
762
- 'id': 34,
763
- 'is': 35,
764
- 'it': 36,
765
- 'ja': 37,
766
- 'ka': 38,
767
- 'kk': 39,
768
- 'km': 40,
769
- 'kn': 41,
770
- 'ko': 42,
771
- 'ky': 43,
772
- 'lo': 44,
773
- 'lt': 45,
774
- 'lv': 46,
775
- 'mk': 47,
776
- 'ml': 48,
777
- 'mn': 49,
778
- 'mr': 50,
779
- 'ms': 51,
780
- 'my': 52,
781
- 'ne': 53,
782
- 'nl': 54,
783
- 'no': 55,
784
- 'or': 56,
785
- 'pa': 57,
786
- 'pl': 58,
787
- 'pt-PT': 59,
788
- 'pt': 60,
789
- 'ro': 61,
790
- 'ru': 62,
791
- 'si': 63,
792
- 'sk': 64,
793
- 'sl': 65,
794
- 'sq': 66,
795
- 'sr-Latn': 67,
796
- 'sr': 68,
797
- 'sv': 69,
798
- 'sw': 70,
799
- 'ta': 71,
800
- 'te': 72,
801
- 'th': 73,
802
- 'tr': 74,
803
- 'uk': 75,
804
- 'ur': 76,
805
- 'uz': 77,
806
- 'vi': 78,
807
- 'zh': 79,
808
- 'zh-HK': 80,
809
- 'zh-TW': 81,
810
- 'zu': 82,
811
- };
741
+ /* eslint-disable @typescript-eslint/naming-convention */
742
+ // TODO(crbug.com/1167717) = Make this a const enum again
743
+ // eslint-disable-next-line rulesdir/const_enum
744
+ export enum Language {
745
+ 'af' = 1,
746
+ 'am' = 2,
747
+ 'ar' = 3,
748
+ 'as' = 4,
749
+ 'az' = 5,
750
+ 'be' = 6,
751
+ 'bg' = 7,
752
+ 'bn' = 8,
753
+ 'bs' = 9,
754
+ 'ca' = 10,
755
+ 'cs' = 11,
756
+ 'cy' = 12,
757
+ 'da' = 13,
758
+ 'de' = 14,
759
+ 'el' = 15,
760
+ 'en-GB' = 16,
761
+ 'en-US' = 17,
762
+ 'es-419' = 18,
763
+ 'es' = 19,
764
+ 'et' = 20,
765
+ 'eu' = 21,
766
+ 'fa' = 22,
767
+ 'fi' = 23,
768
+ 'fil' = 24,
769
+ 'fr-CA' = 25,
770
+ 'fr' = 26,
771
+ 'gl' = 27,
772
+ 'gu' = 28,
773
+ 'he' = 29,
774
+ 'hi' = 30,
775
+ 'hr' = 31,
776
+ 'hu' = 32,
777
+ 'hy' = 33,
778
+ 'id' = 34,
779
+ 'is' = 35,
780
+ 'it' = 36,
781
+ 'ja' = 37,
782
+ 'ka' = 38,
783
+ 'kk' = 39,
784
+ 'km' = 40,
785
+ 'kn' = 41,
786
+ 'ko' = 42,
787
+ 'ky' = 43,
788
+ 'lo' = 44,
789
+ 'lt' = 45,
790
+ 'lv' = 46,
791
+ 'mk' = 47,
792
+ 'ml' = 48,
793
+ 'mn' = 49,
794
+ 'mr' = 50,
795
+ 'ms' = 51,
796
+ 'my' = 52,
797
+ 'ne' = 53,
798
+ 'nl' = 54,
799
+ 'no' = 55,
800
+ 'or' = 56,
801
+ 'pa' = 57,
802
+ 'pl' = 58,
803
+ 'pt-PT' = 59,
804
+ 'pt' = 60,
805
+ 'ro' = 61,
806
+ 'ru' = 62,
807
+ 'si' = 63,
808
+ 'sk' = 64,
809
+ 'sl' = 65,
810
+ 'sq' = 66,
811
+ 'sr-Latn' = 67,
812
+ 'sr' = 68,
813
+ 'sv' = 69,
814
+ 'sw' = 70,
815
+ 'ta' = 71,
816
+ 'te' = 72,
817
+ 'th' = 73,
818
+ 'tr' = 74,
819
+ 'uk' = 75,
820
+ 'ur' = 76,
821
+ 'uz' = 77,
822
+ 'vi' = 78,
823
+ 'zh' = 79,
824
+ 'zh-HK' = 80,
825
+ 'zh-TW' = 81,
826
+ 'zu' = 82,
827
+ MaxValue = 83,
828
+ }
829
+ /* eslint-enable @typescript-eslint/naming-convention */
812
830
 
813
831
  // TODO(crbug.com/1167717): Make this a const enum again
814
832
  // eslint-disable-next-line rulesdir/const_enum
@@ -817,6 +835,7 @@ export enum SyncSetting {
817
835
  ChromeSyncSettingsDisabled = 2,
818
836
  DevToolsSyncSettingDisabled = 3,
819
837
  DevToolsSyncSettingEnabled = 4,
838
+ MaxValue = 5,
820
839
  }
821
840
 
822
841
  // TODO(crbug.com/1167717): Make this a const enum again
@@ -824,6 +843,7 @@ export enum SyncSetting {
824
843
  export enum RecordingToggled {
825
844
  RecordingStarted = 1,
826
845
  RecordingFinished = 2,
846
+ MaxValue = 3,
827
847
  }
828
848
 
829
849
  // TODO(crbug.com/1167717): Make this a const enum again
@@ -833,6 +853,7 @@ export enum RecordingReplayFinished {
833
853
  TimeoutErrorSelectors = 2,
834
854
  TimeoutErrorTarget = 3,
835
855
  OtherError = 4,
856
+ MaxValue = 5,
836
857
  }
837
858
 
838
859
  // TODO(crbug.com/1167717): Make this a const enum again
@@ -840,6 +861,7 @@ export enum RecordingReplayFinished {
840
861
  export enum RecordingReplayStarted {
841
862
  ReplayOnly = 1,
842
863
  ReplayWithPerformanceTracing = 2,
864
+ MaxValue = 3,
843
865
  }
844
866
 
845
867
  // TODO(crbug.com/1167717): Make this a const enum again
@@ -855,6 +877,7 @@ export enum RecordingEdited {
855
877
  SelectorPartRemoved = 8,
856
878
  TypeChanged = 9,
857
879
  OtherEditing = 10,
880
+ MaxValue = 11,
858
881
  }
859
882
 
860
883
  // TODO(crbug.com/1167717): Make this a const enum again
@@ -862,4 +885,15 @@ export enum RecordingEdited {
862
885
  export enum RecordingExported {
863
886
  ToPuppeteer = 1,
864
887
  ToJSON = 2,
888
+ MaxValue = 3,
889
+ }
890
+
891
+ /* eslint-disable @typescript-eslint/naming-convention */
892
+ // TODO(crbug.com/1167717): Make this a const enum again
893
+ // eslint-disable-next-line rulesdir/const_enum
894
+ export enum ConsoleShowsCorsErrors {
895
+ 'false' = 0,
896
+ 'true' = 1,
897
+ MaxValue = 2,
865
898
  }
899
+ /* eslint-enable @typescript-eslint/naming-convention */