chrome-devtools-frontend 1.0.1669021 → 1.0.1672557

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 (302) hide show
  1. package/.agents/skills/fixing-skipped-tests/SKILL.md +6 -6
  2. package/.agents/skills/gerrit-cli/SKILL.md +4 -10
  3. package/.agents/skills/gerrit-cli/references/commands.md +45 -2
  4. package/.agents/skills/gerrit-cli/references/workflows.md +7 -0
  5. package/.agents/skills/gerrit-cli/scripts/import_upstream.py +34 -152
  6. package/config/typescript/tsconfig.eslint.json +1 -1
  7. package/docs/contributing/settings-experiments-features.md +2 -8
  8. package/docs/ecosystem/automatic_workspace_folders.md +0 -19
  9. package/eslint.config.mjs +5 -5
  10. package/front_end/core/common/Lazy.ts +3 -3
  11. package/front_end/core/common/SettingRegistration.ts +0 -7
  12. package/front_end/core/common/Settings.ts +0 -38
  13. package/front_end/core/host/UserMetrics.ts +187 -953
  14. package/front_end/core/host/UserMetricsEnums.ts +949 -0
  15. package/front_end/core/root/Runtime.ts +21 -138
  16. package/front_end/core/sdk/CSSMetadata.ts +70 -65
  17. package/front_end/core/sdk/CategorizedBreakpoint.ts +0 -1
  18. package/front_end/core/sdk/ChildTargetManager.ts +0 -2
  19. package/front_end/core/sdk/EmulationModel.ts +0 -2
  20. package/front_end/core/sdk/EventBreakpointsModel.ts +0 -4
  21. package/front_end/core/sdk/NetworkManager.ts +0 -3
  22. package/front_end/core/sdk/PageResourceLoader.ts +9 -9
  23. package/front_end/core/sdk/RehydratingConnection.ts +52 -4
  24. package/front_end/core/sdk/Target.ts +0 -4
  25. package/front_end/devtools_compatibility.js +886 -0
  26. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +7 -6
  27. package/front_end/entrypoints/main/ExecutionContextSelector.ts +0 -1
  28. package/front_end/entrypoints/main/MainImpl.ts +18 -22
  29. package/front_end/foundation/Universe.ts +7 -2
  30. package/front_end/generated/InspectorBackendCommands.ts +3 -10
  31. package/front_end/generated/{SupportedCSSProperties.js → SupportedCSSProperties.ts} +16 -0
  32. package/front_end/generated/protocol-mapping.d.ts +0 -42
  33. package/front_end/generated/protocol-proxy-api.d.ts +0 -38
  34. package/front_end/generated/protocol.ts +9 -169
  35. package/front_end/models/ai_assistance/AiAgent2.ts +11 -3
  36. package/front_end/models/ai_assistance/AiConversation.ts +1 -0
  37. package/front_end/models/ai_assistance/AiHistoryStorage.ts +8 -5
  38. package/front_end/models/ai_assistance/AiSetting.ts +108 -0
  39. package/front_end/models/ai_assistance/AiUtils.ts +47 -0
  40. package/front_end/models/ai_assistance/ChangeManager.ts +1 -0
  41. package/front_end/models/ai_assistance/ExtensionScope.ts +3 -12
  42. package/front_end/models/ai_assistance/agents/AiAgent.ts +11 -18
  43. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +3 -0
  44. package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +42 -17
  45. package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +1 -1
  46. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +3 -2
  47. package/front_end/models/ai_assistance/agents/StorageAgent.ts +253 -155
  48. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -2
  49. package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
  50. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +12 -6
  51. package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +3 -1
  52. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +1 -0
  53. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +4 -3
  54. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +1 -1
  55. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -0
  56. package/front_end/models/ai_assistance/injected.ts +1 -0
  57. package/front_end/models/ai_assistance/performance/AICallTree.ts +1 -0
  58. package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
  59. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +2 -0
  60. package/front_end/models/ai_assistance/skills/performance.md +10 -0
  61. package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +52 -5
  62. package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +4 -4
  63. package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +4 -4
  64. package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +5 -4
  65. package/front_end/models/ai_assistance/tools/GetStyles.ts +5 -4
  66. package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +5 -4
  67. package/front_end/models/ai_assistance/tools/README.md +1 -1
  68. package/front_end/models/ai_assistance/tools/RecordPerformanceTrace.ts +63 -0
  69. package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +5 -5
  70. package/front_end/models/ai_assistance/tools/Tool.ts +118 -24
  71. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +2 -0
  72. package/front_end/models/badges/UserBadges.ts +2 -0
  73. package/front_end/models/bindings/NetworkProject.ts +5 -0
  74. package/front_end/models/bindings/ResourceScriptMapping.ts +2 -0
  75. package/front_end/models/bindings/ResourceUtils.ts +3 -0
  76. package/front_end/models/crux-manager/CrUXManager.ts +1 -0
  77. package/front_end/models/emulation/DeviceModeModel.ts +140 -7
  78. package/front_end/models/emulation/EmulatedDevices.ts +246 -793
  79. package/front_end/models/issues_manager/IssuesManager.ts +10 -2
  80. package/front_end/models/live-metrics/LiveMetrics.ts +41 -9
  81. package/front_end/models/logs/LogManager.ts +8 -5
  82. package/front_end/models/logs/NetworkLog.ts +1 -0
  83. package/front_end/models/persistence/IsolatedFileSystemManager.ts +21 -3
  84. package/front_end/models/persistence/NetworkPersistenceManager.ts +6 -0
  85. package/front_end/models/project_settings/ProjectSettingsModel.ts +8 -12
  86. package/front_end/models/trace/Processor.ts +42 -10
  87. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +12 -19
  88. package/front_end/models/trace/handlers/MetaHandler.ts +38 -5
  89. package/front_end/models/trace/insights/CLSCulprits.ts +1 -2
  90. package/front_end/models/trace/insights/CharacterSet.ts +1 -1
  91. package/front_end/models/trace/insights/Common.ts +21 -2
  92. package/front_end/models/trace/insights/DocumentLatency.ts +1 -1
  93. package/front_end/models/trace/insights/LCPBreakdown.ts +7 -6
  94. package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
  95. package/front_end/models/trace/insights/ModernHTTP.ts +7 -3
  96. package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -1
  97. package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
  98. package/front_end/models/trace/insights/ThirdParties.ts +5 -2
  99. package/front_end/models/trace/insights/types.ts +11 -6
  100. package/front_end/models/trace/types/Configuration.ts +5 -0
  101. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +3 -1
  102. package/front_end/models/workspace/IgnoreListManager.ts +2 -0
  103. package/front_end/models/workspace/UISourceCode.ts +2 -0
  104. package/front_end/models/workspace_diff/WorkspaceDiff.ts +4 -0
  105. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +22 -22
  106. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +0 -7
  107. package/front_end/panels/ai_assistance/components/ChatInput.ts +4 -0
  108. package/front_end/panels/ai_assistance/components/ChatMessage.ts +79 -34
  109. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +1 -2
  110. package/front_end/panels/ai_assistance/components/walkthroughView.css +1 -1
  111. package/front_end/panels/application/ApplicationPanelSidebar.ts +9 -106
  112. package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
  113. package/front_end/panels/application/application.ts +0 -10
  114. package/front_end/panels/application/components/components.ts +0 -4
  115. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +0 -5
  116. package/front_end/panels/browser_debugger/EventListenerBreakpointsSidebarPane.ts +6 -12
  117. package/front_end/panels/browser_debugger/browser_debugger-meta.ts +5 -3
  118. package/front_end/panels/console/ConsoleFormat.ts +2 -62
  119. package/front_end/panels/console/ConsoleViewMessage.ts +14 -7
  120. package/front_end/panels/elements/ElementsTreeElement.ts +1 -2
  121. package/front_end/panels/emulation/AdvancedApp.ts +1 -2
  122. package/front_end/panels/emulation/DeviceModeToolbar.ts +83 -69
  123. package/front_end/panels/emulation/DeviceModeView.ts +4 -134
  124. package/front_end/panels/emulation/DeviceModeWrapper.ts +52 -69
  125. package/front_end/panels/emulation/MediaQueryInspector.ts +2 -2
  126. package/front_end/panels/emulation/emulation-meta.ts +12 -12
  127. package/front_end/panels/issues/IssuesPane.ts +3 -1
  128. package/front_end/panels/lighthouse/LighthouseController.ts +6 -0
  129. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +17 -21
  130. package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +206 -126
  131. package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +1 -1
  132. package/front_end/panels/mobile_throttling/CalibrationController.ts +1 -1
  133. package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +3 -3
  134. package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +6 -6
  135. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +14 -12
  136. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +13 -13
  137. package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +10 -10
  138. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +28 -28
  139. package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +6 -6
  140. package/front_end/panels/network/RequestHeadersView.ts +1 -1
  141. package/front_end/panels/network/ResourceChunkView.ts +243 -144
  142. package/front_end/panels/network/ResourceDirectSocketChunkView.ts +52 -29
  143. package/front_end/panels/network/ResourceWebSocketFrameView.ts +21 -35
  144. package/front_end/panels/network/resourceChunkView.css +41 -36
  145. package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +21 -12
  146. package/front_end/panels/profiler/profiler.ts +4 -0
  147. package/front_end/panels/recorder/RecorderPanel.ts +6 -14
  148. package/front_end/panels/sensors/LocationsSettingsTab.ts +7 -7
  149. package/front_end/panels/settings/AISettingsTab.ts +75 -31
  150. package/front_end/panels/settings/SettingsScreen.ts +8 -13
  151. package/front_end/panels/settings/components/SyncSection.ts +3 -4
  152. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +650 -18
  153. package/front_end/panels/settings/emulation/devicesSettingsTab.css +18 -0
  154. package/front_end/panels/settings/settings-meta.ts +0 -1
  155. package/front_end/panels/sources/CategorizedBreakpointL10n.ts +0 -2
  156. package/front_end/panels/sources/DebuggerPausedMessage.ts +11 -5
  157. package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
  158. package/front_end/panels/sources/EditingLocationHistoryManager.ts +12 -9
  159. package/front_end/panels/sources/SourcesPanel.ts +19 -17
  160. package/front_end/panels/sources/SourcesView.ts +191 -96
  161. package/front_end/panels/sources/TabbedEditorContainer.ts +3 -4
  162. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +2 -5
  163. package/front_end/panels/timeline/TimelinePanel.ts +2 -0
  164. package/front_end/panels/timeline/TimelineUIUtils.ts +15 -0
  165. package/front_end/panels/timeline/components/CWVMetrics.ts +16 -3
  166. package/front_end/panels/timeline/components/cwvMetrics.css +4 -0
  167. package/front_end/panels/timeline/components/liveMetricsView.css +0 -17
  168. package/front_end/panels/timeline/components/metricValueStyles.css +17 -0
  169. package/front_end/panels/timeline/timeline-meta.ts +3 -5
  170. package/front_end/third_party/chromium/README.chromium +1 -1
  171. package/front_end/third_party/codemirror.next/chunk/angular.js +1 -1
  172. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  173. package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
  174. package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -1
  175. package/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -1
  176. package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
  177. package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
  178. package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
  179. package/front_end/third_party/codemirror.next/chunk/less.js +1 -1
  180. package/front_end/third_party/codemirror.next/chunk/less.js.map +1 -1
  181. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
  182. package/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -1
  183. package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
  184. package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
  185. package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
  186. package/front_end/third_party/codemirror.next/chunk/python.js.map +1 -1
  187. package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
  188. package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
  189. package/front_end/third_party/codemirror.next/chunk/svelte.js +1 -1
  190. package/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -1
  191. package/front_end/third_party/codemirror.next/chunk/vue.js +1 -1
  192. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
  193. package/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -1
  194. package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
  195. package/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -1
  196. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1332 -193
  197. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  198. package/front_end/third_party/codemirror.next/rebuild.sh +1 -1
  199. package/front_end/third_party/puppeteer/README.chromium +2 -2
  200. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +64 -15
  201. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +65 -16
  202. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +50 -7
  203. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
  205. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.d.ts +2 -1
  206. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
  207. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js +5 -5
  208. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js.map +1 -1
  209. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts +2 -1
  210. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +8 -6
  212. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
  213. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Dialog.d.ts.map +1 -1
  214. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Dialog.js +3 -0
  215. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Dialog.js.map +1 -1
  216. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
  217. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +16 -1
  218. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
  219. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.d.ts +5 -1
  220. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.d.ts.map +1 -1
  221. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.js +11 -6
  222. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.js.map +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Dialog.d.ts.map +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Dialog.js +5 -0
  225. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Dialog.js.map +1 -1
  226. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +10 -0
  228. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +4 -3
  230. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
  231. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts +27 -2
  232. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts.map +1 -1
  233. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js +12 -1
  234. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js.map +1 -1
  235. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts +2 -2
  236. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts.map +1 -1
  237. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +2 -2
  238. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
  239. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  240. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js +2 -0
  241. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js.map +1 -1
  242. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts +2 -1
  243. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
  244. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js +5 -4
  245. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js.map +1 -1
  246. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
  247. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
  248. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  249. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  250. package/front_end/third_party/puppeteer/package/lib/types.d.ts +64 -15
  251. package/front_end/third_party/puppeteer/package/package.json +2 -2
  252. package/front_end/third_party/puppeteer/package/src/api/Page.ts +50 -7
  253. package/front_end/third_party/puppeteer/package/src/bidi/BidiOverCdp.ts +9 -7
  254. package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +9 -6
  255. package/front_end/third_party/puppeteer/package/src/bidi/Dialog.ts +4 -0
  256. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +24 -1
  257. package/front_end/third_party/puppeteer/package/src/cdp/Connection.ts +11 -6
  258. package/front_end/third_party/puppeteer/package/src/cdp/Dialog.ts +7 -0
  259. package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +11 -0
  260. package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +7 -3
  261. package/front_end/third_party/puppeteer/package/src/common/Debug.ts +30 -5
  262. package/front_end/third_party/puppeteer/package/src/common/util.ts +2 -2
  263. package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +2 -0
  264. package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +6 -4
  265. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  266. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  267. package/front_end/tsconfig.compatibility.json +2 -1
  268. package/front_end/tsconfig.json +1 -1
  269. package/front_end/ui/components/icon_button/IconButton.ts +1 -1
  270. package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
  271. package/front_end/ui/components/settings/SettingCheckbox.ts +4 -7
  272. package/front_end/ui/components/settings/settings.ts +1 -2
  273. package/front_end/ui/legacy/Treeoutline.ts +52 -30
  274. package/front_end/ui/legacy/components/object_ui/CSSStyleSanitizer.ts +74 -0
  275. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +6 -1
  276. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +47 -54
  277. package/front_end/ui/legacy/components/object_ui/object_ui.ts +2 -0
  278. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -27
  279. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +10 -12
  280. package/front_end/ui/settings/SettingUIRegistration.ts +0 -8
  281. package/front_end/ui/visual_logging/KnownContextValues.ts +37 -0
  282. package/inspector_overlay/tsconfig.json +8 -2
  283. package/package.json +3 -2
  284. package/.agents/skills/gerrit-cli/scripts/gerrit_client_wrapper.py +0 -47
  285. package/front_end/core/sdk/CSSModel.test.api.ts +0 -102
  286. package/front_end/core/sdk/DOMModel.test.api.ts +0 -104
  287. package/front_end/foundation/Universe.test.api.ts +0 -73
  288. package/front_end/panels/application/SharedStorageEventsView.ts +0 -128
  289. package/front_end/panels/application/SharedStorageItemsView.ts +0 -179
  290. package/front_end/panels/application/SharedStorageListTreeElement.ts +0 -65
  291. package/front_end/panels/application/SharedStorageModel.ts +0 -249
  292. package/front_end/panels/application/SharedStorageTreeElement.ts +0 -40
  293. package/front_end/panels/application/components/SharedStorageAccessGrid.ts +0 -191
  294. package/front_end/panels/application/components/SharedStorageMetadataView.ts +0 -133
  295. package/front_end/panels/application/components/sharedStorageAccessGrid.css +0 -29
  296. package/front_end/panels/application/components/sharedStorageMetadataView.css +0 -29
  297. package/front_end/panels/application/sharedStorageEventsView.css +0 -9
  298. package/front_end/panels/network/OriginalResourceChunkView.ts +0 -340
  299. package/front_end/panels/network/originalResourceChunkView.css +0 -49
  300. package/front_end/ui/components/settings/SettingDeprecationWarning.ts +0 -47
  301. package/front_end/ui/components/settings/settingDeprecationWarning.css +0 -14
  302. /package/front_end/generated/{ARIAProperties.js → ARIAProperties.ts} +0 -0
@@ -42,7 +42,8 @@ export function createSettingCheckbox(
42
42
  return label;
43
43
  }
44
44
 
45
- export function renderSettingSelect(setting: Common.Settings.Setting<unknown>, subtitle?: string): TemplateResult {
45
+ export function renderSettingSelect(setting: Common.Settings.Setting<unknown>, subtitle?: string,
46
+ disabled?: boolean): TemplateResult {
46
47
  const uiDescriptor = SettingUIRegistration.SettingUIRegistration.maybeResolve(setting.descriptor());
47
48
  const name = uiDescriptor?.title?.() ?? setting.title();
48
49
  const options = uiDescriptor?.options?.map(opt => ({
@@ -53,7 +54,6 @@ export function renderSettingSelect(setting: Common.Settings.Setting<unknown>, s
53
54
  })) ??
54
55
  setting.options();
55
56
  const requiresReload = Boolean(uiDescriptor?.reloadRequired ?? setting.reloadRequired());
56
- const {deprecation} = setting;
57
57
  const controlId = UI.ARIAUtils.nextId('labelledControl');
58
58
  const reloadWarningRef = createRef<HTMLParagraphElement>();
59
59
 
@@ -76,14 +76,11 @@ export function renderSettingSelect(setting: Common.Settings.Setting<unknown>, s
76
76
  <label for=${controlId}>
77
77
  ${name}
78
78
  ${subtitle ? html`<p>${subtitle}</p>` : nothing}
79
- ${deprecation ? html`<devtools-setting-deprecation-warning .data=${
80
- deprecation as Common.Settings.Deprecation}></devtools-setting-deprecation-warning>` :
81
- nothing}
82
79
  </label>
83
80
  <select
84
81
  id=${controlId}
85
82
  aria-label=${name}
86
- .disabled=${setting.disabled()}
83
+ .disabled=${disabled ?? setting.disabled()}
87
84
  @change=${onSelectChange}
88
85
  jslog=${VisualLogging.dropDown().track({change: true}).context(setting.name)}
89
86
  >
@@ -112,8 +109,8 @@ export function renderSettingSelect(setting: Common.Settings.Setting<unknown>, s
112
109
  // clang-format on
113
110
  }
114
111
 
115
- export const renderControlForSetting = function(
116
- setting: Common.Settings.Setting<unknown>, subtitle?: string): TemplateResult|typeof nothing {
112
+ export const renderControlForSetting = function(setting: Common.Settings.Setting<unknown>, subtitle?: string,
113
+ disabled?: boolean): TemplateResult|typeof nothing {
117
114
  switch (setting.type()) {
118
115
  case Common.Settings.SettingType.BOOLEAN: {
119
116
  const onchange = (): void => {
@@ -126,10 +123,11 @@ export const renderControlForSetting = function(
126
123
  };
127
124
  return html`<setting-checkbox .data=${{
128
125
  setting: setting as Common.Settings.Setting<boolean>,
126
+ disabled,
129
127
  } as Settings.SettingCheckbox.SettingCheckboxData} @change=${onchange}></setting-checkbox>`;
130
128
  }
131
129
  case Common.Settings.SettingType.ENUM: {
132
- return renderSettingSelect(setting, subtitle);
130
+ return renderSettingSelect(setting, subtitle, disabled);
133
131
  }
134
132
  default:
135
133
  console.error('Invalid setting type: ' + setting.type());
@@ -137,9 +135,9 @@ export const renderControlForSetting = function(
137
135
  }
138
136
  };
139
137
 
140
- export const createControlForSetting = function(
141
- setting: Common.Settings.Setting<unknown>, subtitle?: string): HTMLElement|null {
142
- const template = renderControlForSetting(setting, subtitle);
138
+ export const createControlForSetting = function(setting: Common.Settings.Setting<unknown>, subtitle?: string,
139
+ disabled?: boolean): HTMLElement|null {
140
+ const template = renderControlForSetting(setting, subtitle, disabled);
143
141
  if (template === nothing) {
144
142
  return null;
145
143
  }
@@ -30,13 +30,6 @@ export interface SettingUIDescriptor {
30
30
  * Whether DevTools must be reloaded for a change in the setting to take effect.
31
31
  */
32
32
  reloadRequired?: boolean;
33
- /**
34
- * If a setting is deprecated, define this notice to show an appropriate warning according to the `warning` property.
35
- * If `disabled` is set, the setting will be disabled in the settings UI. In that case, `experiment` optionally can be
36
- * set to link to an experiment (by experiment name). The information icon in the settings UI can then be clicked to
37
- * jump to the experiment. If a setting is not disabled, the experiment entry will be ignored.
38
- */
39
- deprecationNotice?: {disabled: boolean, warning: () => Platform.UIString.LocalizedString, experiment?: string};
40
33
  /**
41
34
  * See {@link LearnMore} for more info.
42
35
  */
@@ -78,7 +71,6 @@ export function getRegisteredSettings(): readonly RegisteredSettingUI[] {
78
71
  tags: legacy.tags,
79
72
  options: legacy.options,
80
73
  reloadRequired: legacy.reloadRequired,
81
- deprecationNotice: legacy.deprecationNotice,
82
74
  learnMore: legacy.learnMore,
83
75
  },
84
76
  });
@@ -787,6 +787,7 @@ export const knownContextValues = new Set([
787
787
  'chrome-theme-colors-documentation',
788
788
  'chrome-theme-colors-false',
789
789
  'chrome-windows',
790
+ 'circle',
790
791
  'city',
791
792
  'classic',
792
793
  'clear',
@@ -1269,6 +1270,17 @@ export const knownContextValues = new Set([
1269
1270
  'custom-user-agent-metadata',
1270
1271
  'customize-pwa-tittle-bar',
1271
1272
  'cut',
1273
+ 'cutout-border-radius',
1274
+ 'cutout-cx',
1275
+ 'cutout-cy',
1276
+ 'cutout-height',
1277
+ 'cutout-lower-radius',
1278
+ 'cutout-radius',
1279
+ 'cutout-shape',
1280
+ 'cutout-upper-radius',
1281
+ 'cutout-width',
1282
+ 'cutout-x',
1283
+ 'cutout-y',
1272
1284
  'cx',
1273
1285
  'cy',
1274
1286
  'd',
@@ -1847,7 +1859,9 @@ export const knownContextValues = new Set([
1847
1859
  'full-accessibility-tree-feedback',
1848
1860
  'full-version',
1849
1861
  'function',
1862
+ 'galaxy-z-flip-6',
1850
1863
  'galaxy-z-fold-5',
1864
+ 'galaxy-z-fold-6',
1851
1865
  'gamma',
1852
1866
  'gap',
1853
1867
  'gap-rule-overlap',
@@ -2007,11 +2021,14 @@ export const knownContextValues = new Set([
2007
2021
  'hyphenate-limit-chars',
2008
2022
  'hyphens',
2009
2023
  'i-pad-air',
2024
+ 'i-pad-air-11',
2010
2025
  'i-pad-mini',
2011
2026
  'i-pad-pro',
2027
+ 'i-pad-pro-13',
2012
2028
  'i-phone-12-pro',
2013
2029
  'i-phone-14-pro-max',
2014
2030
  'i-phone-15-pro-max',
2031
+ 'i-phone-16',
2015
2032
  'i-phone-16-pro-max',
2016
2033
  'i-phone-se',
2017
2034
  'i-phone-xr',
@@ -2209,6 +2226,10 @@ export const knownContextValues = new Set([
2209
2226
  'ky',
2210
2227
  'landscape-left',
2211
2228
  'landscape-right',
2229
+ 'landscape-safe-area-bottom',
2230
+ 'landscape-safe-area-left',
2231
+ 'landscape-safe-area-right',
2232
+ 'landscape-safe-area-top',
2212
2233
  'language',
2213
2234
  'language-af',
2214
2235
  'language-am',
@@ -2699,6 +2720,7 @@ export const knownContextValues = new Set([
2699
2720
  'math-shift',
2700
2721
  'math-style',
2701
2722
  'max-block-size',
2723
+ 'max-content-sizing',
2702
2724
  'max-height',
2703
2725
  'max-inline-size',
2704
2726
  'max-lines',
@@ -2772,6 +2794,7 @@ export const knownContextValues = new Set([
2772
2794
  'more-options',
2773
2795
  'more-tabs',
2774
2796
  'more-tools',
2797
+ 'moto-g4',
2775
2798
  'mouse',
2776
2799
  'mousedown',
2777
2800
  'mouseenter',
@@ -2911,6 +2934,7 @@ export const knownContextValues = new Set([
2911
2934
  'none',
2912
2935
  'normal',
2913
2936
  'not-logged-in',
2937
+ 'notch',
2914
2938
  'notification',
2915
2939
  'notification.request-permission',
2916
2940
  'notifications',
@@ -3090,12 +3114,17 @@ export const knownContextValues = new Set([
3090
3114
  'perspective',
3091
3115
  'perspective-origin',
3092
3116
  'picture-in-picture',
3117
+ 'pill',
3093
3118
  'ping',
3094
3119
  'pixel-10',
3095
3120
  'pixel-7',
3096
3121
  'pixel-8',
3097
3122
  'pixel-9',
3123
+ 'pixel-9-pro',
3124
+ 'pixel-9-pro-fold',
3098
3125
  'pixel-9-pro-xl',
3126
+ 'pixel-fold',
3127
+ 'pixel-tablet',
3099
3128
  'pl',
3100
3129
  'place-content',
3101
3130
  'place-items',
@@ -3267,6 +3296,7 @@ export const knownContextValues = new Set([
3267
3296
  'recorder_recordings',
3268
3297
  'recording',
3269
3298
  'recordings',
3299
+ 'rectangle',
3270
3300
  'redirect-source-request',
3271
3301
  'redirect-source-request-url',
3272
3302
  'reduce',
@@ -3469,9 +3499,15 @@ export const knownContextValues = new Set([
3469
3499
  'safari-i-pad-i-os-13.2',
3470
3500
  'safari-i-phone-i-os-13.2',
3471
3501
  'safari-mac',
3502
+ 'safe-area-bottom',
3503
+ 'safe-area-left',
3504
+ 'safe-area-right',
3505
+ 'safe-area-top',
3472
3506
  'same-site',
3473
3507
  'sampling-heap-profiler-timeline',
3508
+ 'samsung-galaxy-a24-4g',
3474
3509
  'samsung-galaxy-a51-71',
3510
+ 'samsung-galaxy-a55',
3475
3511
  'samsung-galaxy-s20-ultra',
3476
3512
  'samsung-galaxy-s8',
3477
3513
  'sans-serif',
@@ -3958,6 +3994,7 @@ export const knownContextValues = new Set([
3958
3994
  'suggestion',
3959
3995
  'supports',
3960
3996
  'surface-duo',
3997
+ 'surface-pro-10',
3961
3998
  'surface-pro-7',
3962
3999
  'suspend',
3963
4000
  'sv',
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "extends": "../config/typescript/tsconfig.base.json",
3
3
  "compilerOptions": {
4
- "lib": ["esnext", "dom", "dom.iterable", "webworker", "webworker.iterable"],
5
- "outDir": "ignored-for-vscode"
4
+ "lib": [
5
+ "esnext",
6
+ "dom",
7
+ "dom.iterable",
8
+ "webworker",
9
+ "webworker.iterable"
10
+ ],
11
+ "noEmit": true
6
12
  }
7
13
  }
package/package.json CHANGED
@@ -85,11 +85,12 @@
85
85
  "svgo": "4.0.2",
86
86
  "terser": "5.48.0",
87
87
  "ts-lit-plugin": "2.0.2",
88
- "typescript": "6.0.2",
88
+ "@typescript/tsc": "npm:typescript@6.0.2",
89
+ "typescript": "npm:@typescript/typescript6@6.0.2",
89
90
  "typescript-eslint": "8.64.0",
90
91
  "uuid": "14.0.0",
91
92
  "webidl2": "24.5.0",
92
93
  "yargs": "17.7.2"
93
94
  },
94
- "version": "1.0.1669021"
95
+ "version": "1.0.1672557"
95
96
  }
@@ -1,47 +0,0 @@
1
- #!/usr/bin/env python3
2
- # Copyright 2026 The Chromium Authors
3
- # Use of this source code is governed by a BSD-style license that can be
4
- # found in the LICENSE file.
5
- """Helper wrapper script to run gerrit_client.py from PATH."""
6
-
7
- import shutil
8
- import subprocess
9
- import sys
10
-
11
-
12
- def main():
13
- client = shutil.which('gerrit_client.py')
14
- if not client:
15
- print('gerrit_client.py not found. '
16
- 'Is depot_tools available and added to PATH?')
17
- sys.exit(1)
18
-
19
- # DevTools specific defaults
20
- default_args = [
21
- '--host',
22
- 'https://chromium-review.googlesource.com',
23
- '--project',
24
- 'devtools/devtools-frontend',
25
- ]
26
-
27
- # gerrit_client.py expects: <command> [options] [args]
28
- # We need to extract the command from sys.argv and put it first.
29
- user_args = sys.argv[1:]
30
- command = []
31
- other_args = []
32
- for i, arg in enumerate(user_args):
33
- if not arg.startswith('-'):
34
- command = [arg]
35
- other_args = user_args[:i] + user_args[i + 1:]
36
- break
37
- else:
38
- other_args = user_args
39
-
40
- full_args = command + default_args + other_args
41
-
42
- rc = subprocess.call(['vpython3', client] + full_args)
43
- sys.exit(rc)
44
-
45
-
46
- if __name__ == '__main__':
47
- main()
@@ -1,102 +0,0 @@
1
- // Copyright 2026 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import {assert} from 'chai';
6
- import sinon from 'sinon';
7
-
8
- // eslint-disable-next-line @devtools/es-modules-import
9
- import * as SDK from './sdk.js';
10
-
11
- interface GlobalWithCSS {
12
- // eslint-disable-next-line @typescript-eslint/naming-convention
13
- CSS?: unknown;
14
- }
15
-
16
- describe('CSSModel API Test', () => {
17
- it('adds a semicolon when enabling a property that lacked one, inserts properties, and enables them correctly',
18
- async ({inspectedPage, universe}) => {
19
- // Mock CSS.supports in Node environment for API tests.
20
- let cssMocked = false;
21
- if (typeof globalThis.CSS === 'undefined') {
22
- (globalThis as unknown as GlobalWithCSS).CSS = undefined;
23
- cssMocked = true;
24
- }
25
- const stub = sinon.stub(globalThis, 'CSS').value({
26
- supports: () => true,
27
- });
28
-
29
- try {
30
- const primaryTarget = universe.targetManager.primaryPageTarget();
31
- assert.isNotNull(primaryTarget);
32
-
33
- const domModel = primaryTarget.model(SDK.DOMModel.DOMModel);
34
- assert.isNotNull(domModel);
35
-
36
- const cssModel = primaryTarget.model(SDK.CSSModel.CSSModel);
37
- assert.isNotNull(cssModel);
38
-
39
- await inspectedPage.goToHtml(`
40
- <style>
41
- #formatted {
42
- color: red;
43
- margin: 0
44
- }
45
- </style>
46
- <div id="formatted">Formatted</div>
47
- `);
48
-
49
- const documentNode = await domModel.requestDocument();
50
- assert.isNotNull(documentNode);
51
-
52
- // Retrieve the subtree to populate the DOMModel cache.
53
- await documentNode.getSubtree(5, true);
54
-
55
- const nodeId = await domModel.querySelector(documentNode.id, '#formatted');
56
- assert.isNotNull(nodeId);
57
-
58
- const matchedResult = await cssModel.getMatchedStyles(nodeId);
59
- assert.isNotNull(matchedResult);
60
-
61
- const style = matchedResult.nodeStyles()[1];
62
- assert.isNotNull(style);
63
-
64
- cssModel.addEventListener(SDK.CSSModel.Events.StyleSheetChanged, event => {
65
- const {edit} = event.data;
66
- if (edit) {
67
- style.rebase(edit);
68
- }
69
- });
70
-
71
- const marginProperty = style.allProperties()[1];
72
- assert.strictEqual(marginProperty.name, 'margin');
73
- assert.strictEqual(marginProperty.value, '0');
74
-
75
- let success = await marginProperty.setDisabled(true);
76
- assert.isTrue(success);
77
- assert.include(style.cssText, '/* margin: 0; */');
78
-
79
- const insertPromise = new Promise<void>(resolve => {
80
- style.insertPropertyAt(2, 'endProperty', 'endValue', success => {
81
- assert.isTrue(success);
82
- resolve();
83
- });
84
- });
85
- await insertPromise;
86
- assert.include(style.cssText, '/* margin: 0; */');
87
- assert.include(style.cssText, 'endProperty: endValue;');
88
-
89
- const updatedMarginProperty = style.allProperties()[1];
90
- success = await updatedMarginProperty.setDisabled(false);
91
- assert.isTrue(success);
92
- assert.include(style.cssText, 'margin: 0;');
93
- assert.include(style.cssText, 'endProperty: endValue;');
94
- } finally {
95
- // Clean up the mock to avoid polluting the global scope.
96
- stub.restore();
97
- if (cssMocked) {
98
- delete (globalThis as unknown as GlobalWithCSS).CSS;
99
- }
100
- }
101
- });
102
- });
@@ -1,104 +0,0 @@
1
- // Copyright 2026 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import {assert} from 'chai';
6
-
7
- import type * as Common from '../common/common.js';
8
-
9
- // eslint-disable-next-line @devtools/es-modules-import
10
- import * as SDK from './sdk.js';
11
-
12
- function findNode(node: SDK.DOMModel.DOMNode, predicate: (node: SDK.DOMModel.DOMNode) => boolean): SDK.DOMModel.DOMNode|
13
- null {
14
- if (predicate(node)) {
15
- return node;
16
- }
17
- const children = node.children();
18
- if (children) {
19
- for (const child of children) {
20
- const result = findNode(child, predicate);
21
- if (result) {
22
- return result;
23
- }
24
- }
25
- }
26
- return null;
27
- }
28
-
29
- describe('DOMModel API Test', () => {
30
- it('generates attribute updated event only when attribute is actually changed', async ({inspectedPage, universe}) => {
31
- const primaryTarget = universe.targetManager.primaryPageTarget();
32
- assert.isNotNull(primaryTarget);
33
-
34
- const domModel = primaryTarget.model(SDK.DOMModel.DOMModel);
35
- assert.isNotNull(domModel);
36
-
37
- await inspectedPage.goToHtml(`
38
- <div id="container">
39
- <div id="node-set-new-value" style="color:red"></div>
40
- <div id="node-set-same-value" style="color:red"></div>
41
- </div>
42
- `);
43
-
44
- const documentNode = await domModel.requestDocument();
45
- assert.isNotNull(documentNode);
46
-
47
- // Retrieve the subtree to populate the DOMModel cache.
48
- await documentNode.getSubtree(5, true);
49
-
50
- const container = findNode(documentNode, n => n.getAttribute('id') === 'container');
51
- assert.isNotNull(container);
52
-
53
- const nodeSetNewValue = findNode(documentNode, n => n.getAttribute('id') === 'node-set-new-value');
54
- assert.isNotNull(nodeSetNewValue);
55
-
56
- const nodeSetSameValue = findNode(documentNode, n => n.getAttribute('id') === 'node-set-same-value');
57
- assert.isNotNull(nodeSetSameValue);
58
-
59
- if (!nodeSetNewValue || !nodeSetSameValue) {
60
- assert.fail('Could not find test nodes');
61
- }
62
-
63
- // Verifies that setting a new style attribute value triggers the AttrModified event.
64
- let attrModifiedPromise = domModel.once(SDK.DOMModel.Events.AttrModified);
65
-
66
- await inspectedPage.evaluate(() => {
67
- (document.getElementById('node-set-new-value') as HTMLElement).style.setProperty('color', 'blue');
68
- });
69
-
70
- let eventData = await attrModifiedPromise;
71
- assert.strictEqual(eventData.node, nodeSetNewValue);
72
- assert.strictEqual(eventData.name, 'style');
73
- assert.strictEqual(nodeSetNewValue.getAttribute('style'), 'color: blue;');
74
-
75
- // Verifies that setting the style attribute to the same value does not trigger the AttrModified event.
76
- let attrModifiedFired = false;
77
- const listener =
78
- (event: Common.EventTarget
79
- .EventTargetEvent<SDK.DOMModel.EventTypes[SDK.DOMModel.Events.AttrModified], SDK.DOMModel.EventTypes>):
80
- void => {
81
- if (event.data.node === nodeSetSameValue) {
82
- attrModifiedFired = true;
83
- }
84
- };
85
- domModel.addEventListener(SDK.DOMModel.Events.AttrModified, listener);
86
-
87
- await inspectedPage.evaluate(() => {
88
- (document.getElementById('node-set-same-value') as HTMLElement).style.setProperty('color', 'red');
89
- });
90
-
91
- // Flushes pending events by triggering a style change on the new value node.
92
- attrModifiedPromise = domModel.once(SDK.DOMModel.Events.AttrModified);
93
-
94
- await inspectedPage.evaluate(() => {
95
- (document.getElementById('node-set-new-value') as HTMLElement).style.setProperty('color', 'green');
96
- });
97
-
98
- eventData = await attrModifiedPromise;
99
- assert.strictEqual(eventData.node, nodeSetNewValue);
100
- assert.isFalse(attrModifiedFired, 'AttrModified should not have fired for same value');
101
-
102
- domModel.removeEventListener(SDK.DOMModel.Events.AttrModified, listener);
103
- });
104
- });
@@ -1,73 +0,0 @@
1
- // Copyright 2026 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import {assert} from 'chai';
6
-
7
- import * as Root from '../core/root/root.js';
8
- import * as SDK from '../core/sdk/sdk.js';
9
-
10
- describe('Universe API Test', () => {
11
- describe('ConsoleModel', () => {
12
- it('receives console messages emitted from inspected page in universe ConsoleModel',
13
- async ({inspectedPage, universe}) => {
14
- assert.isNotNull(universe);
15
-
16
- const primaryTarget = universe.targetManager.primaryPageTarget();
17
- assert.isNotNull(primaryTarget, 'Primary page target should exist in target manager');
18
-
19
- await inspectedPage.goToHtml('<h1>DevTools API Test Page</h1>');
20
-
21
- const consoleModel = primaryTarget?.model(SDK.ConsoleModel.ConsoleModel);
22
- const messagePromise = consoleModel?.once(SDK.ConsoleModel.Events.MessageAdded);
23
-
24
- // eslint-disable-next-line no-console
25
- await inspectedPage.evaluate(() => console.log('Hello from Universe API Test!'));
26
-
27
- const consoleMessage = await messagePromise;
28
- assert.isDefined(consoleMessage);
29
- assert.strictEqual(
30
- consoleMessage?.messageText,
31
- 'Hello from Universe API Test!',
32
- 'Console message should be received by universe ConsoleModel',
33
- );
34
- });
35
- });
36
-
37
- describe('Suite with setup configuration', () => {
38
- setup({
39
- creationOptions: {
40
- hostConfig: {
41
- devToolsConsoleInsights: {
42
- enabled: true,
43
- modelId: 'test-model',
44
- temperature: 0.7,
45
- },
46
- },
47
- },
48
- });
49
-
50
- it('applies hostConfig from setup creationOptions globally and to Universe', async ({universe}) => {
51
- assert.isNotNull(universe);
52
- assert.isTrue(Root.Runtime.hostConfig.devToolsConsoleInsights?.enabled);
53
- assert.strictEqual(Root.Runtime.hostConfig.devToolsConsoleInsights?.modelId, 'test-model');
54
- });
55
- });
56
-
57
- describe('Suite with targetUrl configuration', () => {
58
- setup({
59
- targetUrl: 'data:text/html,<!DOCTYPE%20html><h1>Target%20URL%20Test</h1>',
60
- });
61
-
62
- it('navigates to targetUrl before attaching universe', async ({inspectedPage}) => {
63
- const heading = await inspectedPage.evaluate(() => document.querySelector('h1')?.textContent);
64
- assert.strictEqual(heading, 'Target URL Test');
65
- });
66
- });
67
-
68
- describe('Suite without custom setup', () => {
69
- it('restores default hostConfig after previous test suite cleaned up', async () => {
70
- assert.isUndefined(Root.Runtime.hostConfig.devToolsConsoleInsights?.modelId);
71
- });
72
- });
73
- });