chrome-devtools-frontend 1.0.970391 → 1.0.972361

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 (109) hide show
  1. package/config/gni/devtools_grd_files.gni +11 -7
  2. package/config/gni/devtools_image_files.gni +1 -0
  3. package/front_end/Images/src/ic_changes.svg +5 -0
  4. package/front_end/core/common/ParsedURL.ts +33 -4
  5. package/front_end/core/host/UserMetrics.ts +4 -1
  6. package/front_end/core/i18n/locales/en-US.json +21 -3
  7. package/front_end/core/i18n/locales/en-XL.json +21 -3
  8. package/front_end/core/platform/UserVisibleError.ts +28 -0
  9. package/front_end/core/platform/platform.ts +2 -0
  10. package/front_end/core/sdk/CSSModel.ts +21 -0
  11. package/front_end/core/sdk/CSSStyleSheetHeader.ts +10 -10
  12. package/front_end/core/sdk/ChildTargetManager.ts +0 -1
  13. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +6 -4
  14. package/front_end/core/sdk/DOMDebuggerModel.ts +4 -3
  15. package/front_end/core/sdk/DebuggerModel.ts +21 -16
  16. package/front_end/core/sdk/NetworkManager.ts +17 -3
  17. package/front_end/core/sdk/NetworkRequest.ts +16 -5
  18. package/front_end/core/sdk/Resource.ts +10 -10
  19. package/front_end/core/sdk/ResourceTreeModel.ts +18 -13
  20. package/front_end/core/sdk/Script.ts +10 -10
  21. package/front_end/core/sdk/SourceMap.ts +3 -1
  22. package/front_end/entrypoints/lighthouse_worker/LighthouseService.ts +14 -7
  23. package/front_end/entrypoints/main/MainImpl.ts +8 -0
  24. package/front_end/generated/InspectorBackendCommands.js +14 -8
  25. package/front_end/generated/SupportedCSSProperties.js +2 -0
  26. package/front_end/generated/protocol-mapping.d.ts +5 -0
  27. package/front_end/generated/protocol-proxy-api.d.ts +5 -0
  28. package/front_end/generated/protocol.ts +20 -12
  29. package/front_end/models/bindings/BreakpointManager.ts +7 -5
  30. package/front_end/models/bindings/CSSWorkspaceBinding.ts +10 -3
  31. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +2 -1
  32. package/front_end/models/bindings/ResourceMapping.ts +2 -1
  33. package/front_end/models/bindings/ResourceScriptMapping.ts +2 -1
  34. package/front_end/models/bindings/StylesSourceMapping.ts +2 -1
  35. package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +12 -12
  36. package/front_end/models/issues_manager/descriptions/{federatedAuthRequestClientIdMetadataHttpNotFound.md → federatedAuthRequestClientMetadataHttpNotFound.md} +0 -0
  37. package/front_end/models/issues_manager/descriptions/{federatedAuthRequestClientIdMetadataInvalidResponse.md → federatedAuthRequestClientMetadataInvalidResponse.md} +0 -0
  38. package/front_end/models/issues_manager/descriptions/{federatedAuthRequestClientIdMetadataNoResponse.md → federatedAuthRequestClientMetadataNoResponse.md} +0 -0
  39. package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  40. package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  41. package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  42. package/front_end/models/persistence/Automapping.ts +3 -33
  43. package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +12 -10
  44. package/front_end/models/persistence/IsolatedFileSystem.ts +26 -22
  45. package/front_end/models/persistence/NetworkPersistenceManager.ts +8 -4
  46. package/front_end/models/persistence/PersistenceActions.ts +1 -4
  47. package/front_end/models/persistence/PlatformFileSystem.ts +6 -5
  48. package/front_end/{panels/sources/SourceMapNamesResolver.ts → models/source_map_scopes/NamesResolver.ts} +5 -5
  49. package/front_end/models/source_map_scopes/source_map_scopes.ts +7 -0
  50. package/front_end/models/text_utils/ContentProvider.ts +2 -1
  51. package/front_end/models/text_utils/StaticContentProvider.ts +5 -4
  52. package/front_end/models/workspace/UISourceCode.ts +18 -21
  53. package/front_end/models/workspace/WorkspaceImpl.ts +3 -1
  54. package/front_end/models/workspace_diff/WorkspaceDiff.ts +20 -8
  55. package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
  56. package/front_end/panels/browser_debugger/categorizedBreakpointsSidebarPane.css +0 -1
  57. package/front_end/panels/changes/ChangesView.ts +4 -4
  58. package/front_end/panels/console/ConsolePrompt.ts +25 -2
  59. package/front_end/panels/console/ConsoleViewMessage.ts +41 -8
  60. package/front_end/panels/coverage/CoverageModel.ts +1 -1
  61. package/front_end/panels/elements/ElementsPanel.ts +25 -11
  62. package/front_end/panels/elements/ElementsTreeElement.ts +0 -6
  63. package/front_end/panels/elements/StylesSidebarPane.ts +236 -51
  64. package/front_end/panels/elements/elementsTreeOutline.css +0 -1
  65. package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
  66. package/front_end/panels/issues/AffectedSourcesView.ts +1 -1
  67. package/front_end/panels/lighthouse/LighthouseController.ts +30 -0
  68. package/front_end/panels/lighthouse/LighthousePanel.ts +7 -1
  69. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +6 -1
  70. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +0 -5
  71. package/front_end/panels/lighthouse/LighthouseStartView.ts +2 -2
  72. package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +39 -0
  73. package/front_end/panels/network/NetworkDataGridNode.ts +1 -1
  74. package/front_end/panels/profiler/CPUProfileView.ts +1 -1
  75. package/front_end/panels/profiler/HeapProfileView.ts +0 -2
  76. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +0 -1
  77. package/front_end/panels/profiler/HeapSnapshotView.ts +2 -3
  78. package/front_end/panels/sensors/sensors.css +0 -1
  79. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +5 -5
  80. package/front_end/panels/snippets/SnippetsQuickOpen.ts +1 -1
  81. package/front_end/panels/sources/DebuggerPlugin.ts +5 -4
  82. package/front_end/panels/sources/NavigatorView.ts +13 -7
  83. package/front_end/panels/sources/ScopeChainSidebarPane.ts +6 -3
  84. package/front_end/panels/sources/SourcesNavigator.ts +7 -1
  85. package/front_end/panels/sources/TabbedEditorContainer.ts +9 -0
  86. package/front_end/panels/sources/sources-legacy.ts +5 -16
  87. package/front_end/panels/sources/sources.ts +0 -2
  88. package/front_end/panels/sources/sourcesView.css +0 -4
  89. package/front_end/panels/timeline/TimelineUIUtils.ts +4 -47
  90. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1047 -1158
  91. package/front_end/third_party/lighthouse/locales/en-US.json +7 -1
  92. package/front_end/third_party/lighthouse/locales/en-XL.json +7 -1
  93. package/front_end/third_party/lighthouse/report/bundle.d.ts +0 -3
  94. package/front_end/third_party/lighthouse/report/bundle.js +38 -24
  95. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
  96. package/front_end/ui/legacy/ViewManager.ts +2 -1
  97. package/front_end/ui/legacy/closeButton.css +0 -1
  98. package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -1
  99. package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -1
  100. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +2 -3
  101. package/front_end/ui/legacy/components/utils/Linkifier.ts +20 -59
  102. package/front_end/ui/legacy/tabbedPane.css +0 -2
  103. package/front_end/ui/legacy/toolbar.css +28 -3
  104. package/package.json +1 -1
  105. package/scripts/hosted_mode/server.js +13 -0
  106. package/scripts/npm_test.js +1 -1
  107. package/front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownHttpNotFound.md +0 -1
  108. package/front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownInvalidResponse.md +0 -1
  109. package/front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownNoResponse.md +0 -1
@@ -423,7 +423,7 @@ export class _ExpandableContainerWidget extends VBox {
423
423
 
424
424
  this.titleElement = document.createElement('div');
425
425
  this.titleElement.classList.add('expandable-view-title');
426
- ARIAUtils.markAsButton(this.titleElement);
426
+ ARIAUtils.markAsTab(this.titleElement);
427
427
  this.titleExpandIcon = Icon.create('smallicon-triangle-right', 'title-expand-icon');
428
428
  this.titleElement.appendChild(this.titleExpandIcon);
429
429
  const titleText = view.title();
@@ -847,6 +847,7 @@ class _StackLocation extends Location implements ViewLocation {
847
847
  const vbox = new VBox();
848
848
  super(manager, vbox, revealCallback);
849
849
  this.vbox = vbox;
850
+ ARIAUtils.markAsTablist(vbox.element);
850
851
 
851
852
  this.expandableContainers = new Map();
852
853
 
@@ -7,7 +7,6 @@
7
7
  .close-button {
8
8
  width: 14px;
9
9
  height: 14px;
10
- cursor: default;
11
10
  display: flex;
12
11
  align-items: center;
13
12
  justify-content: center;
@@ -51,7 +51,7 @@ const UIStrings = {
51
51
  const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/source_frame/FontView.ts', UIStrings);
52
52
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
53
53
  export class FontView extends UI.View.SimpleView {
54
- private readonly url: string;
54
+ private readonly url: Platform.DevToolsPath.UrlString;
55
55
  private readonly mimeType: string;
56
56
  private readonly contentProvider: TextUtils.ContentProvider.ContentProvider;
57
57
  private readonly mimeTypeLabel: UI.Toolbar.ToolbarText;
@@ -84,7 +84,7 @@ const UIStrings = {
84
84
  const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/source_frame/ImageView.ts', UIStrings);
85
85
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
86
86
  export class ImageView extends UI.View.SimpleView {
87
- private url: string;
87
+ private url: Platform.DevToolsPath.UrlString;
88
88
  private parsedURL: Common.ParsedURL.ParsedURL;
89
89
  private readonly mimeType: string;
90
90
  private readonly contentProvider: TextUtils.ContentProvider.ContentProvider;
@@ -120,9 +120,8 @@ export function buildStackTraceRows(
120
120
  const rowCountHide = regularRowCount > 30 && stackTrace.callFrames.length > 31;
121
121
  let ignoreListHide = false;
122
122
  const functionName = UI.UIUtils.beautifyFunctionName(stackFrame.functionName);
123
- const link = linkifier.maybeLinkifyConsoleCallFrame(
124
- target, stackFrame,
125
- {tabStop: Boolean(tabStops), className: undefined, columnNumber: undefined, inlineFrameIndex: 0});
123
+ const link =
124
+ linkifier.maybeLinkifyConsoleCallFrame(target, stackFrame, {tabStop: Boolean(tabStops), inlineFrameIndex: 0});
126
125
  if (link) {
127
126
  link.addEventListener('contextmenu', populateContextMenu.bind(null, link));
128
127
  // TODO(crbug.com/1183325): fix race condition with uiLocation still being null here
@@ -195,17 +195,14 @@ export class Linkifier implements SDK.TargetManager.Observer {
195
195
  target: SDK.Target.Target|null, scriptId: Protocol.Runtime.ScriptId|null, sourceURL: string,
196
196
  lineNumber: number|undefined, options?: LinkifyOptions): HTMLElement|null {
197
197
  let fallbackAnchor: HTMLElement|null = null;
198
- const linkifyURLOptions = {
198
+ const linkifyURLOptions: LinkifyURLOptions = {
199
199
  lineNumber,
200
200
  maxLength: this.maxLength,
201
- columnNumber: options ? options.columnNumber : undefined,
201
+ columnNumber: options?.columnNumber,
202
202
  showColumnNumber: Boolean(options?.showColumnNumber),
203
- className: options ? options.className : undefined,
204
- tabStop: options ? options.tabStop : undefined,
205
- inlineFrameIndex: options ? options.inlineFrameIndex : 0,
206
- text: undefined,
207
- preventClick: undefined,
208
- bypassURLTrimming: undefined,
203
+ className: options?.className,
204
+ tabStop: options?.tabStop,
205
+ inlineFrameIndex: options?.inlineFrameIndex ?? 0,
209
206
  };
210
207
  const {columnNumber, className = ''} = linkifyURLOptions;
211
208
  if (sourceURL) {
@@ -230,13 +227,8 @@ export class Linkifier implements SDK.TargetManager.Observer {
230
227
  return fallbackAnchor;
231
228
  }
232
229
 
233
- const createLinkOptions = {
234
- maxLength: undefined,
235
- title: undefined,
236
- href: undefined,
237
- preventClick: undefined,
238
- bypassURLTrimming: undefined,
239
- tabStop: options ? options.tabStop : undefined,
230
+ const createLinkOptions: _CreateLinkOptions = {
231
+ tabStop: options?.tabStop,
240
232
  };
241
233
  // Not initialising the anchor element with 'zero width space' (\u200b) causes a crash
242
234
  // in the layout engine.
@@ -275,17 +267,14 @@ export class Linkifier implements SDK.TargetManager.Observer {
275
267
  target: SDK.Target.Target|null, scriptId: Protocol.Runtime.ScriptId|null, sourceURL: string,
276
268
  lineNumber: number|undefined, options?: LinkifyOptions): HTMLElement {
277
269
  const scriptLink = this.maybeLinkifyScriptLocation(target, scriptId, sourceURL, lineNumber, options);
278
- const linkifyURLOptions = {
270
+ const linkifyURLOptions: LinkifyURLOptions = {
279
271
  lineNumber,
280
272
  maxLength: this.maxLength,
281
- className: options ? options.className : undefined,
282
- columnNumber: options ? options.columnNumber : undefined,
273
+ className: options?.className,
274
+ columnNumber: options?.columnNumber,
283
275
  showColumnNumber: Boolean(options?.showColumnNumber),
284
- inlineFrameIndex: options ? options.inlineFrameIndex : 0,
285
- tabStop: options ? options.tabStop : undefined,
286
- text: undefined,
287
- preventClick: undefined,
288
- bypassURLTrimming: undefined,
276
+ inlineFrameIndex: options?.inlineFrameIndex ?? 0,
277
+ tabStop: options?.tabStop,
289
278
  };
290
279
 
291
280
  return scriptLink || Linkifier.linkifyURL(sourceURL, linkifyURLOptions);
@@ -296,7 +285,6 @@ export class Linkifier implements SDK.TargetManager.Observer {
296
285
  rawLocation.debuggerModel.target(), rawLocation.scriptId, fallbackUrl, rawLocation.lineNumber, {
297
286
  columnNumber: rawLocation.columnNumber,
298
287
  className,
299
- tabStop: undefined,
300
288
  inlineFrameIndex: rawLocation.inlineFrameIndex,
301
289
  });
302
290
  }
@@ -304,12 +292,12 @@ export class Linkifier implements SDK.TargetManager.Observer {
304
292
  maybeLinkifyConsoleCallFrame(
305
293
  target: SDK.Target.Target|null, callFrame: Protocol.Runtime.CallFrame, options?: LinkifyOptions): HTMLElement
306
294
  |null {
307
- const linkifyOptions = {
295
+ const linkifyOptions: LinkifyOptions = {
308
296
  columnNumber: callFrame.columnNumber,
309
297
  showColumnNumber: Boolean(options?.showColumnNumber),
310
- inlineFrameIndex: options ? options.inlineFrameIndex : 0,
311
- tabStop: options ? options.tabStop : undefined,
312
- className: options ? options.className : undefined,
298
+ inlineFrameIndex: options?.inlineFrameIndex ?? 0,
299
+ tabStop: options?.tabStop,
300
+ className: options?.className,
313
301
  };
314
302
  return this.maybeLinkifyScriptLocation(
315
303
  target, callFrame.scriptId, callFrame.url, callFrame.lineNumber, linkifyOptions);
@@ -327,10 +315,7 @@ export class Linkifier implements SDK.TargetManager.Observer {
327
315
  showColumnNumber: false,
328
316
  inlineFrameIndex: 0,
329
317
  maxLength: this.maxLength,
330
- text: undefined,
331
318
  preventClick: true,
332
- tabStop: undefined,
333
- bypassURLTrimming: undefined,
334
319
  });
335
320
 
336
321
  // The contract is that disposed targets don't have a LiveLocationPool
@@ -373,12 +358,7 @@ export class Linkifier implements SDK.TargetManager.Observer {
373
358
  }
374
359
 
375
360
  linkifyCSSLocation(rawLocation: SDK.CSSModel.CSSLocation, classes?: string): Element {
376
- const createLinkOptions = {
377
- maxLength: undefined,
378
- title: undefined,
379
- href: undefined,
380
- preventClick: undefined,
381
- bypassURLTrimming: undefined,
361
+ const createLinkOptions: _CreateLinkOptions = {
382
362
  tabStop: true,
383
363
  };
384
364
  // Not initialising the anchor element with 'zero width space' (\u200b) causes a crash
@@ -454,7 +434,7 @@ export class Linkifier implements SDK.TargetManager.Observer {
454
434
  const text = uiLocation.linkText(true /* skipTrim */, options.showColumnNumber);
455
435
  Linkifier.setTrimmedText(anchor, text, this.maxLength);
456
436
 
457
- let titleText = uiLocation.uiSourceCode.url();
437
+ let titleText: string = uiLocation.uiSourceCode.url();
458
438
  if (uiLocation.uiSourceCode.mimeType() === 'application/wasm') {
459
439
  // For WebAssembly locations, we follow the conventions described in
460
440
  // github.com/WebAssembly/design/blob/master/Web.md#developer-facing-display-conventions
@@ -497,16 +477,8 @@ export class Linkifier implements SDK.TargetManager.Observer {
497
477
 
498
478
  static linkifyURL(url: string, options?: LinkifyURLOptions): HTMLElement {
499
479
  options = options || {
500
- text: undefined,
501
- className: undefined,
502
- lineNumber: undefined,
503
- columnNumber: undefined,
504
480
  showColumnNumber: false,
505
481
  inlineFrameIndex: 0,
506
- preventClick: undefined,
507
- maxLength: undefined,
508
- tabStop: undefined,
509
- bypassURLTrimming: undefined,
510
482
  };
511
483
  const text = options.text;
512
484
  const className = options.className || '';
@@ -547,29 +519,18 @@ export class Linkifier implements SDK.TargetManager.Observer {
547
519
  static linkifyRevealable(
548
520
  revealable: Object, text: string|HTMLElement, fallbackHref?: string, title?: string,
549
521
  className?: string): HTMLElement {
550
- const createLinkOptions = {
522
+ const createLinkOptions: _CreateLinkOptions = {
551
523
  maxLength: UI.UIUtils.MaxLengthForDisplayedURLs,
552
524
  href: fallbackHref,
553
525
  title,
554
- preventClick: undefined,
555
- tabStop: undefined,
556
- bypassURLTrimming: undefined,
557
526
  };
558
527
  const {link, linkInfo} = Linkifier.createLink(text, className || '', createLinkOptions);
559
528
  linkInfo.revealable = revealable;
560
529
  return link;
561
530
  }
562
531
 
563
- private static createLink(text: string|HTMLElement, className: string, options?: _CreateLinkOptions):
532
+ private static createLink(text: string|HTMLElement, className: string, options: _CreateLinkOptions = {}):
564
533
  {link: HTMLElement, linkInfo: _LinkInfo} {
565
- options = options || {
566
- maxLength: undefined,
567
- title: undefined,
568
- href: undefined,
569
- preventClick: undefined,
570
- tabStop: undefined,
571
- bypassURLTrimming: undefined,
572
- };
573
534
  const {maxLength, title, href, preventClick, tabStop, bypassURLTrimming} = options;
574
535
  const link = document.createElement('span');
575
536
  if (className) {
@@ -194,7 +194,6 @@
194
194
  .tabbed-pane-header-tabs-drop-down-container {
195
195
  float: left;
196
196
  opacity: 80%;
197
- cursor: pointer;
198
197
  display: flex;
199
198
  align-items: center;
200
199
  height: 100%;
@@ -347,7 +346,6 @@
347
346
 
348
347
  width: 14px;
349
348
  height: 14px;
350
- cursor: default;
351
349
  display: flex;
352
350
  align-items: center;
353
351
  justify-content: center;
@@ -7,12 +7,14 @@
7
7
  :host {
8
8
  flex: none;
9
9
  padding: 0 2px;
10
+
11
+ --toolbar-height: 26px;
10
12
  }
11
13
 
12
14
  .toolbar-shadow {
13
15
  position: relative;
14
16
  white-space: nowrap;
15
- height: 26px;
17
+ height: var(--toolbar-height);
16
18
  overflow: hidden;
17
19
  z-index: 12;
18
20
  display: flex;
@@ -43,7 +45,7 @@
43
45
  align-items: center;
44
46
  justify-content: center;
45
47
  padding: 0;
46
- height: 26px;
48
+ height: var(--toolbar-height);
47
49
  border: none;
48
50
  white-space: pre;
49
51
  }
@@ -55,7 +57,7 @@
55
57
 
56
58
  .toolbar-shadow.vertical .toolbar-item {
57
59
  height: auto;
58
- min-height: 26px;
60
+ min-height: var(--toolbar-height);
59
61
  white-space: normal;
60
62
  }
61
63
 
@@ -175,6 +177,29 @@ it. */
175
177
  margin-inline-end: 28px;
176
178
  }
177
179
 
180
+ .toolbar-button.copied-to-clipboard::after {
181
+ content: attr(data-content);
182
+ position: fixed;
183
+ top: var(--toolbar-height);
184
+ padding: 3px 5px;
185
+ color: var(--color-text-secondary);
186
+ background: var(--color-background-elevation-1);
187
+ animation: 2s fade-out;
188
+ font-weight: normal;
189
+ border: 1px solid var(--color-details-hairline);
190
+ border-radius: 3px;
191
+ }
192
+
193
+ @keyframes fade-out {
194
+ from {
195
+ opacity: 100%;
196
+ }
197
+
198
+ to {
199
+ opacity: 0%;
200
+ }
201
+ }
202
+
178
203
  .toolbar-button.toolbar-state-on .toolbar-glyph {
179
204
  background-color: var(--color-primary);
180
205
  }
package/package.json CHANGED
@@ -54,5 +54,5 @@
54
54
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
55
55
  "watch": "third_party/node/node.py --output scripts/watch_build.js"
56
56
  },
57
- "version": "1.0.970391"
57
+ "version": "1.0.972361"
58
58
  }
@@ -177,6 +177,19 @@ async function requestHandler(request, response) {
177
177
  // This is fine to do given that test invocations run against fresh Chrome profiles.
178
178
  headers.set('Cache-Control', 'max-age=3600');
179
179
  }
180
+ if (!headers.get('Access-Control-Allow-Origin')) {
181
+ // The DevTools frontend in hosted-mode uses regular fetch to get source maps etc.
182
+ // Disable CORS only for the DevTools frontend, not for resource/target pages.
183
+ // Since Chrome will cache resources, we have to indicate that CORS can still vary
184
+ // based on the origin that made the request. E.g. the target page loads a script first
185
+ // but then DevTools also wants to load it. In the former, we disallow cross-origin requests by default,
186
+ // while for the latter we allow it.
187
+ const requestedByDevTools = request.headers.origin?.includes('devtools-frontend.test');
188
+ if (requestedByDevTools) {
189
+ headers.set('Access-Control-Allow-Origin', request.headers.origin);
190
+ }
191
+ headers.set('Vary', 'Origin');
192
+ }
180
193
  headers.forEach((value, header) => {
181
194
  response.setHeader(header, value);
182
195
  });
@@ -91,7 +91,7 @@ function runTests(buildDirectoryPath, useDebugDevtools) {
91
91
 
92
92
  if (IS_DEBUG_ENABLED) {
93
93
  testArgs.push('--additional-driver-flag=--remote-debugging-port=9222');
94
- testArgs.push('--time-out-ms=6000000');
94
+ testArgs.push('--timeout-ms=6000000');
95
95
  console.log('\n=============================================');
96
96
  const unitTest = testArgs.find(arg => arg.includes('http/tests/devtools/unit/'));
97
97
  if (unitTest) {
@@ -1 +0,0 @@
1
- # The provider's .well-known configuration cannot be found.
@@ -1 +0,0 @@
1
- # Provider's .well-known configuration is invalid.
@@ -1 +0,0 @@
1
- # The response body is empty when fetching the provider's .well-known configuration.