chrome-devtools-frontend 1.0.1578729 → 1.0.1581449
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.
- package/agents/prompts/creating-a-model.md +51 -0
- package/docs/cookbook/devtools_on_devtools.md +2 -2
- package/docs/feature-specs/elements-gutter-decorators.md +40 -0
- package/docs/feature-specs/elements-tree-edit-html.md +14 -0
- package/docs/feature-specs/elements-tree-node-title.md +46 -0
- package/docs/feature-specs/elements-tree-selection-and-hover.md +31 -0
- package/docs/feature-specs/images/elements-gutter-decorators-multiple.png +0 -0
- package/docs/get_the_code.md +3 -3
- package/front_end/core/host/UserMetrics.ts +3 -7
- package/front_end/core/root/Runtime.ts +0 -1
- package/front_end/core/sdk/NetworkManager.ts +0 -35
- package/front_end/core/sdk/OverlayModel.ts +10 -0
- package/front_end/devtools_compatibility.js +4 -0
- package/front_end/entrypoints/devtools_app/devtools_app.ts +1 -0
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +530 -0
- package/front_end/entrypoints/greendev_floaty/floaty.css +258 -0
- package/front_end/entrypoints/greendev_floaty/floaty.html +31 -0
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +422 -0
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +0 -38
- package/front_end/generated/ARIAProperties.js +0 -6
- package/front_end/generated/InspectorBackendCommands.ts +10 -4
- package/front_end/generated/SupportedCSSProperties.js +39 -31
- package/front_end/generated/protocol-mapping.d.ts +12 -0
- package/front_end/generated/protocol-proxy-api.d.ts +12 -0
- package/front_end/generated/protocol.ts +57 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +32 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +110 -6
- package/front_end/models/computed_style/computed_style.ts +9 -0
- package/front_end/models/issues_manager/CorsIssue.ts +11 -14
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +33 -4
- package/front_end/panels/ai_assistance/components/ChatInput.ts +52 -19
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +7 -4
- package/front_end/panels/ai_assistance/components/ChatView.ts +4 -0
- package/front_end/panels/ai_assistance/components/chatInput.css +10 -3
- package/front_end/panels/application/DeviceBoundSessionsView.ts +51 -76
- package/front_end/panels/changes/changesSidebar.css +5 -0
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +2 -2
- package/front_end/panels/common/AiCodeGenerationUpgradeDialog.ts +4 -4
- package/front_end/panels/common/ExtensionPanel.ts +4 -0
- package/front_end/panels/common/FreDialog.ts +4 -0
- package/front_end/panels/coverage/CoverageListView.ts +18 -3
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +89 -0
- package/front_end/panels/elements/ComputedStyleWidget.ts +12 -8
- package/front_end/panels/elements/ElementsPanel.ts +4 -3
- package/front_end/panels/elements/ElementsSidebarPane.ts +11 -8
- package/front_end/panels/elements/ElementsTreeElement.ts +92 -121
- package/front_end/panels/elements/ElementsTreeOutline.ts +26 -15
- package/front_end/panels/elements/MetricsSidebarPane.ts +2 -2
- package/front_end/panels/elements/PlatformFontsWidget.ts +7 -5
- package/front_end/panels/elements/PropertiesWidget.ts +3 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -3
- package/front_end/panels/elements/elements.ts +4 -3
- package/front_end/panels/elements/elementsTreeOutline.css +16 -5
- package/front_end/panels/greendev/GreenDevPanel.css +241 -0
- package/front_end/panels/greendev/GreenDevPanel.ts +308 -0
- package/front_end/panels/greendev/GreenDevShared.ts +13 -0
- package/front_end/panels/greendev/greendev-meta.ts +52 -0
- package/front_end/panels/greendev/greendev.ts +9 -0
- package/front_end/panels/issues/CorsIssueDetailsView.ts +4 -4
- package/front_end/panels/lighthouse/LighthouseStartView.ts +1 -1
- package/front_end/panels/lighthouse/lighthouseStartView.css +6 -0
- package/front_end/panels/network/NetworkLogView.ts +2 -5
- package/front_end/panels/security/SecurityPanel.ts +0 -4
- package/front_end/panels/security/SecurityPanelSidebar.ts +2 -42
- package/front_end/panels/security/security-meta.ts +2 -14
- package/front_end/panels/security/security.ts +0 -4
- package/front_end/panels/settings/EditFileSystemView.ts +8 -8
- package/front_end/panels/settings/SettingsScreen.ts +4 -4
- package/front_end/panels/sources/SourcesSearchScope.ts +2 -1
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +47 -26
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +121 -39
- package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +106 -101
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +35 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js +19 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +21 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +6 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js +56 -36
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +32 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +32 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +20 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +25 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js +23 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +10 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +29 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +46 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +18 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js +13 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/JSHandle.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +7 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +43 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.d.ts +10 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.js +34 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Cookie.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Cookie.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +129 -3
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +233 -65
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +35 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js +19 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +21 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +6 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js +56 -36
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +30 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +32 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +20 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +25 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js +23 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +10 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts +29 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +46 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +19 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js +14 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/JSHandle.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +7 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +43 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.d.ts +10 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.js +31 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +129 -3
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +46 -0
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +21 -0
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +23 -0
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +88 -56
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +33 -8
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +61 -3
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +23 -2
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +29 -8
- package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +30 -0
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +13 -2
- package/front_end/third_party/puppeteer/package/src/bidi/core/UserContext.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +85 -8
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +36 -1
- package/front_end/third_party/puppeteer/package/src/cdp/ExecutionContext.ts +5 -5
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +23 -2
- package/front_end/third_party/puppeteer/package/src/cdp/JSHandle.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +60 -8
- package/front_end/third_party/puppeteer/package/src/cdp/utils.ts +36 -3
- package/front_end/third_party/puppeteer/package/src/common/Cookie.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/injected/XPathQuerySelector.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/node/PuppeteerNode.ts +8 -6
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/text_editor/AutocompleteHistory.ts +2 -1
- package/front_end/ui/components/text_editor/TextEditorHistory.ts +1 -1
- package/front_end/ui/legacy/InplaceEditor.ts +1 -1
- package/front_end/ui/legacy/SearchableView.ts +5 -2
- package/front_end/ui/legacy/Widget.ts +15 -0
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +50 -1
- package/front_end/ui/legacy/components/data_grid/SortableDataGrid.ts +59 -9
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +2 -1
- package/front_end/ui/legacy/components/data_grid/data_grid.ts +1 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +28 -15
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +2 -2
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +2 -3
- package/front_end/ui/visual_logging/Debugging.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +13 -0
- package/mcp/mcp.ts +1 -0
- package/package.json +1 -1
- package/front_end/panels/security/CookieControlsTreeElement.ts +0 -21
- package/front_end/panels/security/CookieControlsView.ts +0 -447
- package/front_end/panels/security/CookieReportTreeElement.ts +0 -21
- package/front_end/panels/security/CookieReportView.ts +0 -549
- package/front_end/panels/security/cookieControlsView.css +0 -139
- package/front_end/panels/security/cookieReportView.css +0 -90
- /package/front_end/{panels/elements → models/computed_style}/ComputedStyleModel.ts +0 -0
|
@@ -78,6 +78,35 @@ export interface SerializedAXNode {
|
|
|
78
78
|
*/
|
|
79
79
|
invalid?: string;
|
|
80
80
|
orientation?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Whether the node is {@link https://www.w3.org/TR/wai-aria/#aria-busy | busy}.
|
|
83
|
+
*/
|
|
84
|
+
busy?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* The {@link https://www.w3.org/TR/wai-aria/#aria-live | live} status of the
|
|
87
|
+
* node.
|
|
88
|
+
*/
|
|
89
|
+
live?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Whether the live region is
|
|
92
|
+
* {@link https://www.w3.org/TR/wai-aria/#aria-atomic | atomic}.
|
|
93
|
+
*/
|
|
94
|
+
atomic?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* The {@link https://www.w3.org/TR/wai-aria/#aria-relevant | relevant}
|
|
97
|
+
* changes for the live region.
|
|
98
|
+
*/
|
|
99
|
+
relevant?: string;
|
|
100
|
+
/**
|
|
101
|
+
* The {@link https://www.w3.org/TR/wai-aria/#aria-errormessage | error message}
|
|
102
|
+
* for the node.
|
|
103
|
+
*/
|
|
104
|
+
errormessage?: string;
|
|
105
|
+
/**
|
|
106
|
+
* The {@link https://www.w3.org/TR/wai-aria/#aria-details | details} for the
|
|
107
|
+
* node.
|
|
108
|
+
*/
|
|
109
|
+
details?: string;
|
|
81
110
|
|
|
82
111
|
/**
|
|
83
112
|
* Url for link elements.
|
|
@@ -342,17 +371,27 @@ class AXNode {
|
|
|
342
371
|
#editable = false;
|
|
343
372
|
#focusable = false;
|
|
344
373
|
#hidden = false;
|
|
374
|
+
#busy = false;
|
|
375
|
+
#modal = false;
|
|
376
|
+
#hasErrormessage = false;
|
|
377
|
+
#hasDetails = false;
|
|
345
378
|
#name: string;
|
|
346
379
|
#role: string;
|
|
380
|
+
#description?: string;
|
|
381
|
+
#roledescription?: string;
|
|
382
|
+
#live?: string;
|
|
347
383
|
#ignored: boolean;
|
|
348
384
|
#cachedHasFocusableChild?: boolean;
|
|
349
385
|
#realm: Realm;
|
|
350
386
|
|
|
351
387
|
constructor(realm: Realm, payload: Protocol.Accessibility.AXNode) {
|
|
352
388
|
this.payload = payload;
|
|
353
|
-
this.#name = this.payload.name ? this.payload.name.value : '';
|
|
354
389
|
this.#role = this.payload.role ? this.payload.role.value : 'Unknown';
|
|
355
390
|
this.#ignored = this.payload.ignored;
|
|
391
|
+
this.#name = this.payload.name ? this.payload.name.value : '';
|
|
392
|
+
this.#description = this.payload.description
|
|
393
|
+
? this.payload.description.value
|
|
394
|
+
: undefined;
|
|
356
395
|
this.#realm = realm;
|
|
357
396
|
for (const property of this.payload.properties || []) {
|
|
358
397
|
if (property.name === 'editable') {
|
|
@@ -365,6 +404,24 @@ class AXNode {
|
|
|
365
404
|
if (property.name === 'hidden') {
|
|
366
405
|
this.#hidden = property.value.value;
|
|
367
406
|
}
|
|
407
|
+
if (property.name === 'busy') {
|
|
408
|
+
this.#busy = property.value.value;
|
|
409
|
+
}
|
|
410
|
+
if (property.name === 'live') {
|
|
411
|
+
this.#live = property.value.value;
|
|
412
|
+
}
|
|
413
|
+
if (property.name === 'modal') {
|
|
414
|
+
this.#modal = property.value.value;
|
|
415
|
+
}
|
|
416
|
+
if (property.name === 'roledescription') {
|
|
417
|
+
this.#roledescription = property.value.value;
|
|
418
|
+
}
|
|
419
|
+
if (property.name === 'errormessage') {
|
|
420
|
+
this.#hasErrormessage = true;
|
|
421
|
+
}
|
|
422
|
+
if (property.name === 'details') {
|
|
423
|
+
this.#hasDetails = true;
|
|
424
|
+
}
|
|
368
425
|
}
|
|
369
426
|
}
|
|
370
427
|
|
|
@@ -512,7 +569,16 @@ class AXNode {
|
|
|
512
569
|
return true;
|
|
513
570
|
}
|
|
514
571
|
|
|
515
|
-
if (
|
|
572
|
+
if (
|
|
573
|
+
this.#focusable ||
|
|
574
|
+
this.#richlyEditable ||
|
|
575
|
+
this.#busy ||
|
|
576
|
+
(this.#live && this.#live !== 'off') ||
|
|
577
|
+
this.#modal ||
|
|
578
|
+
this.#hasErrormessage ||
|
|
579
|
+
this.#hasDetails ||
|
|
580
|
+
this.#roledescription
|
|
581
|
+
) {
|
|
516
582
|
return true;
|
|
517
583
|
}
|
|
518
584
|
|
|
@@ -526,7 +592,7 @@ class AXNode {
|
|
|
526
592
|
return false;
|
|
527
593
|
}
|
|
528
594
|
|
|
529
|
-
return this.isLeafNode() && !!this.#name;
|
|
595
|
+
return this.isLeafNode() && (!!this.#name || !!this.#description);
|
|
530
596
|
}
|
|
531
597
|
|
|
532
598
|
public serialize(): SerializedAXNode {
|
|
@@ -605,7 +671,9 @@ class AXNode {
|
|
|
605
671
|
| 'multiselectable'
|
|
606
672
|
| 'readonly'
|
|
607
673
|
| 'required'
|
|
608
|
-
| 'selected'
|
|
674
|
+
| 'selected'
|
|
675
|
+
| 'busy'
|
|
676
|
+
| 'atomic';
|
|
609
677
|
const booleanProperties: BooleanProperty[] = [
|
|
610
678
|
'disabled',
|
|
611
679
|
'expanded',
|
|
@@ -616,9 +684,11 @@ class AXNode {
|
|
|
616
684
|
'readonly',
|
|
617
685
|
'required',
|
|
618
686
|
'selected',
|
|
687
|
+
'busy',
|
|
688
|
+
'atomic',
|
|
619
689
|
];
|
|
620
690
|
const getBooleanPropertyValue = (key: BooleanProperty): boolean => {
|
|
621
|
-
return properties.get(key)
|
|
691
|
+
return !!properties.get(key);
|
|
622
692
|
};
|
|
623
693
|
|
|
624
694
|
for (const booleanProperty of booleanProperties) {
|
|
@@ -628,8 +698,7 @@ class AXNode {
|
|
|
628
698
|
if (booleanProperty === 'focused' && this.#role === 'RootWebArea') {
|
|
629
699
|
continue;
|
|
630
700
|
}
|
|
631
|
-
|
|
632
|
-
if (value === undefined) {
|
|
701
|
+
if (!properties.has(booleanProperty)) {
|
|
633
702
|
continue;
|
|
634
703
|
}
|
|
635
704
|
node[booleanProperty] = getBooleanPropertyValue(booleanProperty);
|
|
@@ -666,12 +735,20 @@ class AXNode {
|
|
|
666
735
|
| 'autocomplete'
|
|
667
736
|
| 'haspopup'
|
|
668
737
|
| 'invalid'
|
|
669
|
-
| 'orientation'
|
|
738
|
+
| 'orientation'
|
|
739
|
+
| 'live'
|
|
740
|
+
| 'relevant'
|
|
741
|
+
| 'errormessage'
|
|
742
|
+
| 'details';
|
|
670
743
|
const tokenProperties: TokenProperty[] = [
|
|
671
744
|
'autocomplete',
|
|
672
745
|
'haspopup',
|
|
673
746
|
'invalid',
|
|
674
747
|
'orientation',
|
|
748
|
+
'live',
|
|
749
|
+
'relevant',
|
|
750
|
+
'errormessage',
|
|
751
|
+
'details',
|
|
675
752
|
];
|
|
676
753
|
const getTokenPropertyValue = (key: TokenProperty): string => {
|
|
677
754
|
return properties.get(key) as string;
|
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type {Protocol} from 'devtools-protocol';
|
|
8
|
+
|
|
7
9
|
import type {CreatePageOptions} from '../api/Browser.js';
|
|
8
10
|
import {
|
|
9
11
|
WEB_PERMISSION_TO_PROTOCOL_PERMISSION,
|
|
10
12
|
type Permission,
|
|
13
|
+
type PermissionDescriptor,
|
|
14
|
+
type PermissionState,
|
|
11
15
|
} from '../api/Browser.js';
|
|
12
16
|
import {BrowserContext} from '../api/BrowserContext.js';
|
|
13
17
|
import type {Page} from '../api/Page.js';
|
|
@@ -17,7 +21,10 @@ import {assert} from '../util/assert.js';
|
|
|
17
21
|
|
|
18
22
|
import type {CdpBrowser} from './Browser.js';
|
|
19
23
|
import type {Connection} from './Connection.js';
|
|
20
|
-
import {
|
|
24
|
+
import {
|
|
25
|
+
convertCookiesPartitionKeyFromPuppeteerToCdp,
|
|
26
|
+
convertSameSiteFromPuppeteerToCdp,
|
|
27
|
+
} from './Page.js';
|
|
21
28
|
import type {CdpTarget} from './Target.js';
|
|
22
29
|
|
|
23
30
|
/**
|
|
@@ -83,6 +90,33 @@ export class CdpBrowserContext extends BrowserContext {
|
|
|
83
90
|
});
|
|
84
91
|
}
|
|
85
92
|
|
|
93
|
+
override async setPermission(
|
|
94
|
+
origin: string | '*',
|
|
95
|
+
...permissions: Array<{
|
|
96
|
+
permission: PermissionDescriptor;
|
|
97
|
+
state: PermissionState;
|
|
98
|
+
}>
|
|
99
|
+
): Promise<void> {
|
|
100
|
+
await Promise.all(
|
|
101
|
+
permissions.map(async permission => {
|
|
102
|
+
const protocolPermission: Protocol.Browser.PermissionDescriptor = {
|
|
103
|
+
name: permission.permission.name,
|
|
104
|
+
userVisibleOnly: permission.permission.userVisibleOnly,
|
|
105
|
+
sysex: permission.permission.sysex,
|
|
106
|
+
allowWithoutSanitization:
|
|
107
|
+
permission.permission.allowWithoutSanitization,
|
|
108
|
+
panTiltZoom: permission.permission.panTiltZoom,
|
|
109
|
+
};
|
|
110
|
+
await this.#connection.send('Browser.setPermission', {
|
|
111
|
+
origin: origin === '*' ? undefined : origin,
|
|
112
|
+
browserContextId: this.#id || undefined,
|
|
113
|
+
permission: protocolPermission,
|
|
114
|
+
setting: permission.state as Protocol.Browser.PermissionSetting,
|
|
115
|
+
});
|
|
116
|
+
}),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
86
120
|
override async clearPermissionOverrides(): Promise<void> {
|
|
87
121
|
await this.#connection.send('Browser.resetPermissions', {
|
|
88
122
|
browserContextId: this.#id || undefined,
|
|
@@ -131,6 +165,7 @@ export class CdpBrowserContext extends BrowserContext {
|
|
|
131
165
|
partitionKey: convertCookiesPartitionKeyFromPuppeteerToCdp(
|
|
132
166
|
cookie.partitionKey,
|
|
133
167
|
),
|
|
168
|
+
sameSite: convertSameSiteFromPuppeteerToCdp(cookie.sameSite),
|
|
134
169
|
};
|
|
135
170
|
}),
|
|
136
171
|
});
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
addPageBinding,
|
|
37
37
|
CDP_BINDING_PREFIX,
|
|
38
38
|
createEvaluationError,
|
|
39
|
-
|
|
39
|
+
valueFromPrimitiveRemoteObject,
|
|
40
40
|
} from './utils.js';
|
|
41
41
|
|
|
42
42
|
const ariaQuerySelectorBinding = new Binding(
|
|
@@ -403,7 +403,7 @@ export class ExecutionContext
|
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
if (returnByValue) {
|
|
406
|
-
return
|
|
406
|
+
return valueFromPrimitiveRemoteObject(remoteObject) as HandleFor<
|
|
407
407
|
Awaited<ReturnType<Func>>
|
|
408
408
|
>;
|
|
409
409
|
}
|
|
@@ -457,9 +457,9 @@ export class ExecutionContext
|
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
if (returnByValue) {
|
|
460
|
-
return
|
|
461
|
-
|
|
462
|
-
|
|
460
|
+
return valueFromPrimitiveRemoteObject(
|
|
461
|
+
remoteObject,
|
|
462
|
+
) as unknown as HandleFor<Awaited<ReturnType<Func>>>;
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
return this.#world.createCdpHandle(remoteObject) as HandleFor<
|
|
@@ -17,7 +17,11 @@ import {
|
|
|
17
17
|
handleError,
|
|
18
18
|
} from '../api/HTTPRequest.js';
|
|
19
19
|
import {debugError} from '../common/util.js';
|
|
20
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
mergeUint8Arrays,
|
|
22
|
+
stringToBase64,
|
|
23
|
+
stringToTypedArray,
|
|
24
|
+
} from '../util/encoding.js';
|
|
21
25
|
|
|
22
26
|
import type {CdpHTTPResponse} from './HTTPResponse.js';
|
|
23
27
|
|
|
@@ -92,7 +96,24 @@ export class CdpHTTPRequest extends HTTPRequest {
|
|
|
92
96
|
this.#url = data.request.url + (data.request.urlFragment ?? '');
|
|
93
97
|
this.#resourceType = (data.type || 'other').toLowerCase() as ResourceType;
|
|
94
98
|
this.#method = data.request.method;
|
|
95
|
-
|
|
99
|
+
if (
|
|
100
|
+
data.request.postDataEntries &&
|
|
101
|
+
data.request.postDataEntries.length > 0
|
|
102
|
+
) {
|
|
103
|
+
this.#postData = new TextDecoder().decode(
|
|
104
|
+
mergeUint8Arrays(
|
|
105
|
+
data.request.postDataEntries
|
|
106
|
+
.map(entry => {
|
|
107
|
+
return entry.bytes ? stringToTypedArray(entry.bytes, true) : null;
|
|
108
|
+
})
|
|
109
|
+
.filter((entry): entry is Uint8Array => {
|
|
110
|
+
return entry !== null;
|
|
111
|
+
}),
|
|
112
|
+
),
|
|
113
|
+
);
|
|
114
|
+
} else {
|
|
115
|
+
this.#postData = data.request.postData;
|
|
116
|
+
}
|
|
96
117
|
this.#hasPostData = data.request.hasPostData ?? false;
|
|
97
118
|
this.#frame = frame;
|
|
98
119
|
this._redirectChain = redirectChain;
|
|
@@ -12,7 +12,7 @@ import {debugError} from '../common/util.js';
|
|
|
12
12
|
|
|
13
13
|
import type {CdpElementHandle} from './ElementHandle.js';
|
|
14
14
|
import type {IsolatedWorld} from './IsolatedWorld.js';
|
|
15
|
-
import {
|
|
15
|
+
import {valueFromPrimitiveRemoteObject} from './utils.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @internal
|
|
@@ -45,7 +45,7 @@ export class CdpJSHandle<T = unknown> extends JSHandle<T> {
|
|
|
45
45
|
|
|
46
46
|
override async jsonValue(): Promise<T> {
|
|
47
47
|
if (!this.#remoteObject.objectId) {
|
|
48
|
-
return
|
|
48
|
+
return valueFromPrimitiveRemoteObject(this.#remoteObject) as T;
|
|
49
49
|
}
|
|
50
50
|
const value = await this.evaluate(object => {
|
|
51
51
|
return object;
|
|
@@ -74,7 +74,7 @@ export class CdpJSHandle<T = unknown> extends JSHandle<T> {
|
|
|
74
74
|
|
|
75
75
|
override toString(): string {
|
|
76
76
|
if (!this.#remoteObject.objectId) {
|
|
77
|
-
return 'JSHandle:' +
|
|
77
|
+
return 'JSHandle:' + valueFromPrimitiveRemoteObject(this.#remoteObject);
|
|
78
78
|
}
|
|
79
79
|
const type = this.#remoteObject.subtype || this.#remoteObject.type;
|
|
80
80
|
return 'JSHandle@' + type;
|
|
@@ -16,7 +16,11 @@ import type {ElementHandle} from '../api/ElementHandle.js';
|
|
|
16
16
|
import type {Frame, WaitForOptions} from '../api/Frame.js';
|
|
17
17
|
import type {HTTPResponse} from '../api/HTTPResponse.js';
|
|
18
18
|
import type {JSHandle} from '../api/JSHandle.js';
|
|
19
|
-
import type {
|
|
19
|
+
import type {
|
|
20
|
+
Credentials,
|
|
21
|
+
HeapSnapshotOptions,
|
|
22
|
+
ReloadOptions,
|
|
23
|
+
} from '../api/Page.js';
|
|
20
24
|
import {
|
|
21
25
|
Page,
|
|
22
26
|
PageEvent,
|
|
@@ -37,6 +41,7 @@ import type {
|
|
|
37
41
|
DeleteCookiesRequest,
|
|
38
42
|
CookieParam,
|
|
39
43
|
CookiePartitionKey,
|
|
44
|
+
CookieSameSite,
|
|
40
45
|
} from '../common/Cookie.js';
|
|
41
46
|
import {TargetCloseError} from '../common/Errors.js';
|
|
42
47
|
import {EventEmitter} from '../common/EventEmitter.js';
|
|
@@ -54,6 +59,7 @@ import {
|
|
|
54
59
|
validateDialogType,
|
|
55
60
|
} from '../common/util.js';
|
|
56
61
|
import type {Viewport} from '../common/Viewport.js';
|
|
62
|
+
import {environment} from '../environment.js';
|
|
57
63
|
import {assert} from '../util/assert.js';
|
|
58
64
|
import {Deferred} from '../util/Deferred.js';
|
|
59
65
|
import {AsyncDisposableStack} from '../util/disposable.js';
|
|
@@ -82,7 +88,7 @@ import {Tracing} from './Tracing.js';
|
|
|
82
88
|
import {
|
|
83
89
|
createClientError,
|
|
84
90
|
pageBindingInitString,
|
|
85
|
-
|
|
91
|
+
valueFromJSHandle,
|
|
86
92
|
} from './utils.js';
|
|
87
93
|
import {CdpWebWorker} from './WebWorker.js';
|
|
88
94
|
|
|
@@ -95,6 +101,22 @@ function convertConsoleMessageLevel(method: string): ConsoleMessageType {
|
|
|
95
101
|
}
|
|
96
102
|
}
|
|
97
103
|
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
export function convertSameSiteFromPuppeteerToCdp(
|
|
108
|
+
sameSite: CookieSameSite | undefined,
|
|
109
|
+
): Protocol.Network.CookieSameSite | undefined {
|
|
110
|
+
switch (sameSite) {
|
|
111
|
+
case 'Strict':
|
|
112
|
+
case 'Lax':
|
|
113
|
+
case 'None':
|
|
114
|
+
return sameSite;
|
|
115
|
+
default:
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
98
120
|
/**
|
|
99
121
|
* @internal
|
|
100
122
|
*/
|
|
@@ -712,6 +734,7 @@ export class CdpPage extends Page {
|
|
|
712
734
|
partitionKey: convertCookiesPartitionKeyFromPuppeteerToCdp(
|
|
713
735
|
cookieParam.partitionKey,
|
|
714
736
|
),
|
|
737
|
+
sameSite: convertSameSiteFromPuppeteerToCdp(cookieParam.sameSite),
|
|
715
738
|
};
|
|
716
739
|
}),
|
|
717
740
|
});
|
|
@@ -812,6 +835,40 @@ export class CdpPage extends Page {
|
|
|
812
835
|
return this.#buildMetricsObject(response.metrics);
|
|
813
836
|
}
|
|
814
837
|
|
|
838
|
+
override async captureHeapSnapshot(
|
|
839
|
+
options: HeapSnapshotOptions,
|
|
840
|
+
): Promise<void> {
|
|
841
|
+
const {createWriteStream} = environment.value.fs;
|
|
842
|
+
const stream = createWriteStream(options.path);
|
|
843
|
+
const streamPromise = new Promise<void>((resolve, reject) => {
|
|
844
|
+
stream.on('error', reject);
|
|
845
|
+
stream.on('finish', resolve);
|
|
846
|
+
});
|
|
847
|
+
|
|
848
|
+
const client = this.#primaryTargetClient;
|
|
849
|
+
await client.send('HeapProfiler.enable');
|
|
850
|
+
await client.send('HeapProfiler.collectGarbage');
|
|
851
|
+
|
|
852
|
+
const handler = (
|
|
853
|
+
event: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent,
|
|
854
|
+
) => {
|
|
855
|
+
stream.write(event.chunk);
|
|
856
|
+
};
|
|
857
|
+
client.on('HeapProfiler.addHeapSnapshotChunk', handler);
|
|
858
|
+
|
|
859
|
+
try {
|
|
860
|
+
await client.send('HeapProfiler.takeHeapSnapshot', {
|
|
861
|
+
reportProgress: false,
|
|
862
|
+
});
|
|
863
|
+
} finally {
|
|
864
|
+
client.off('HeapProfiler.addHeapSnapshotChunk', handler);
|
|
865
|
+
await client.send('HeapProfiler.disable');
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
stream.end();
|
|
869
|
+
await streamPromise;
|
|
870
|
+
}
|
|
871
|
+
|
|
815
872
|
#emitMetrics(event: Protocol.Performance.MetricsEvent): void {
|
|
816
873
|
this.emit(PageEvent.Metrics, {
|
|
817
874
|
title: event.title,
|
|
@@ -857,12 +914,7 @@ export class CdpPage extends Page {
|
|
|
857
914
|
// eslint-disable-next-line max-len -- The comment is long.
|
|
858
915
|
// eslint-disable-next-line @puppeteer/use-using -- These are not owned by this function.
|
|
859
916
|
for (const arg of values) {
|
|
860
|
-
|
|
861
|
-
if (remoteObject.objectId) {
|
|
862
|
-
textTokens.push(arg.toString());
|
|
863
|
-
} else {
|
|
864
|
-
textTokens.push(valueFromRemoteObject(remoteObject));
|
|
865
|
-
}
|
|
917
|
+
textTokens.push(valueFromJSHandle(arg));
|
|
866
918
|
}
|
|
867
919
|
const stackTraceLocations = [];
|
|
868
920
|
if (event.stackTrace) {
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import type {Protocol} from 'devtools-protocol';
|
|
8
8
|
|
|
9
|
+
import type {JSHandle} from '../api/JSHandle.js';
|
|
9
10
|
import {PuppeteerURL, evaluationString} from '../common/util.js';
|
|
10
11
|
import {assert} from '../util/assert.js';
|
|
11
12
|
|
|
@@ -25,7 +26,7 @@ export function createEvaluationError(
|
|
|
25
26
|
details.exception.subtype !== 'error') &&
|
|
26
27
|
!details.exception.objectId
|
|
27
28
|
) {
|
|
28
|
-
return
|
|
29
|
+
return valueFromPrimitiveRemoteObject(details.exception);
|
|
29
30
|
} else {
|
|
30
31
|
const detail = getErrorDetails(details);
|
|
31
32
|
name = detail.name;
|
|
@@ -105,7 +106,7 @@ export function createClientError(
|
|
|
105
106
|
details.exception.subtype !== 'error') &&
|
|
106
107
|
!details.exception.objectId
|
|
107
108
|
) {
|
|
108
|
-
return
|
|
109
|
+
return valueFromPrimitiveRemoteObject(details.exception);
|
|
109
110
|
} else {
|
|
110
111
|
const detail = getErrorDetails(details);
|
|
111
112
|
name = detail.name;
|
|
@@ -139,7 +140,39 @@ export function createClientError(
|
|
|
139
140
|
/**
|
|
140
141
|
* @internal
|
|
141
142
|
*/
|
|
142
|
-
export function
|
|
143
|
+
export function valueFromJSHandle(handle: JSHandle): unknown {
|
|
144
|
+
const remoteObject = handle.remoteObject();
|
|
145
|
+
if (remoteObject.objectId) {
|
|
146
|
+
return valueFromRemoteObjectReference(handle);
|
|
147
|
+
} else {
|
|
148
|
+
return valueFromPrimitiveRemoteObject(remoteObject);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
export function valueFromRemoteObjectReference(handle: JSHandle): string {
|
|
156
|
+
const remoteObject = handle.remoteObject();
|
|
157
|
+
assert(
|
|
158
|
+
remoteObject.objectId,
|
|
159
|
+
'Cannot extract value when no objectId is given',
|
|
160
|
+
);
|
|
161
|
+
const description = remoteObject.description ?? '';
|
|
162
|
+
if (remoteObject.subtype === 'error' && description) {
|
|
163
|
+
const newlineIdx = description.indexOf('\n');
|
|
164
|
+
if (newlineIdx === -1) {
|
|
165
|
+
return description;
|
|
166
|
+
}
|
|
167
|
+
return description.slice(0, newlineIdx);
|
|
168
|
+
}
|
|
169
|
+
return `[${remoteObject.subtype || remoteObject.type} ${remoteObject.className}]`;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @internal
|
|
174
|
+
*/
|
|
175
|
+
export function valueFromPrimitiveRemoteObject(
|
|
143
176
|
remoteObject: Protocol.Runtime.RemoteObject,
|
|
144
177
|
): unknown {
|
|
145
178
|
assert(!remoteObject.objectId, 'Cannot extract value when objectId is given');
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
|
-
export const source = "\"use strict\";var g=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var Y=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var r in e)g(t,r,{get:e[r],enumerable:!0})},G=(t,e,r,o)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let s of B(e))!Y.call(t,s)&&s!==r&&g(t,s,{get:()=>e[s],enumerable:!(o=X(e,s))||o.enumerable});return t};var J=t=>G(g({},\"__esModule\",{value:!0}),t);var pe={};l(pe,{default:()=>he});module.exports=J(pe);var N=class extends Error{constructor(e,r){super(e,r),this.name=this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}},p=class extends N{};var c=class t{static create(e){return new t(e)}static async race(e){let r=new Set;try{let o=e.map(s=>s instanceof t?(s.#s&&r.add(s),s.valueOrThrow()):s);return await Promise.race(o)}finally{for(let o of r)o.reject(new Error(\"Timeout cleared\"))}}#e=!1;#r=!1;#o;#t;#a=new Promise(e=>{this.#t=e});#s;#i;constructor(e){e&&e.timeout>0&&(this.#i=new p(e.message),this.#s=setTimeout(()=>{this.reject(this.#i)},e.timeout))}#l(e){clearTimeout(this.#s),this.#o=e,this.#t()}resolve(e){this.#r||this.#e||(this.#e=!0,this.#l(e))}reject(e){this.#r||this.#e||(this.#r=!0,this.#l(e))}resolved(){return this.#e}finished(){return this.#e||this.#r}value(){return this.#o}#n;valueOrThrow(){return this.#n||(this.#n=(async()=>{if(await this.#a,this.#r)throw this.#o;return this.#o})()),this.#n}};var L=new Map,W=t=>{let e=L.get(t);return e||(e=new Function(`return ${t}`)(),L.set(t,e),e)};var b={};l(b,{ariaQuerySelector:()=>z,ariaQuerySelectorAll:()=>x});var z=(t,e)=>globalThis.__ariaQuerySelector(t,e),x=async function*(t,e){yield*await globalThis.__ariaQuerySelectorAll(t,e)};var E={};l(E,{cssQuerySelector:()=>K,cssQuerySelectorAll:()=>Z});var K=(t,e)=>t.querySelector(e),Z=function(t,e){return t.querySelectorAll(e)};var A={};l(A,{customQuerySelectors:()=>P});var v=class{#e=new Map;register(e,r){if(!r.queryOne&&r.queryAll){let o=r.queryAll;r.queryOne=(s,i)=>{for(let n of o(s,i))return n;return null}}else if(r.queryOne&&!r.queryAll){let o=r.queryOne;r.queryAll=(s,i)=>{let n=o(s,i);return n?[n]:[]}}else if(!r.queryOne||!r.queryAll)throw new Error(\"At least one query method must be defined.\");this.#e.set(e,{querySelector:r.queryOne,querySelectorAll:r.queryAll})}unregister(e){this.#e.delete(e)}get(e){return this.#e.get(e)}clear(){this.#e.clear()}},P=new v;var R={};l(R,{pierceQuerySelector:()=>ee,pierceQuerySelectorAll:()=>te});var ee=(t,e)=>{let r=null,o=s=>{let i=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT);do{let n=i.currentNode;n.shadowRoot&&o(n.shadowRoot),!(n instanceof ShadowRoot)&&n!==s&&!r&&n.matches(e)&&(r=n)}while(!r&&i.nextNode())};return t instanceof Document&&(t=t.documentElement),o(t),r},te=(t,e)=>{let r=[],o=s=>{let i=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT);do{let n=i.currentNode;n.shadowRoot&&o(n.shadowRoot),!(n instanceof ShadowRoot)&&n!==s&&n.matches(e)&&r.push(n)}while(i.nextNode())};return t instanceof Document&&(t=t.documentElement),o(t),r};var u=(t,e)=>{if(!t)throw new Error(e)};var y=class{#e;#r;#o;#t;constructor(e,r){this.#e=e,this.#r=r}async start(){let e=this.#t=c.create(),r=await this.#e();if(r){e.resolve(r);return}this.#o=new MutationObserver(async()=>{let o=await this.#e();o&&(e.resolve(o),await this.stop())}),this.#o.observe(this.#r,{childList:!0,subtree:!0,attributes:!0})}async stop(){u(this.#t,\"Polling never started.\"),this.#t.finished()||this.#t.reject(new Error(\"Polling stopped\")),this.#o&&(this.#o.disconnect(),this.#o=void 0)}result(){return u(this.#t,\"Polling never started.\"),this.#t.valueOrThrow()}},w=class{#e;#r;constructor(e){this.#e=e}async start(){let e=this.#r=c.create(),r=await this.#e();if(r){e.resolve(r);return}let o=async()=>{if(e.finished())return;let s=await this.#e();if(!s){window.requestAnimationFrame(o);return}e.resolve(s),await this.stop()};window.requestAnimationFrame(o)}async stop(){u(this.#r,\"Polling never started.\"),this.#r.finished()||this.#r.reject(new Error(\"Polling stopped\"))}result(){return u(this.#r,\"Polling never started.\"),this.#r.valueOrThrow()}},T=class{#e;#r;#o;#t;constructor(e,r){this.#e=e,this.#r=r}async start(){let e=this.#t=c.create(),r=await this.#e();if(r){e.resolve(r);return}this.#o=setInterval(async()=>{let o=await this.#e();o&&(e.resolve(o),await this.stop())},this.#r)}async stop(){u(this.#t,\"Polling never started.\"),this.#t.finished()||this.#t.reject(new Error(\"Polling stopped\")),this.#o&&(clearInterval(this.#o),this.#o=void 0)}result(){return u(this.#t,\"Polling never started.\"),this.#t.valueOrThrow()}};var _={};l(_,{PCombinator:()=>H,pQuerySelector:()=>fe,pQuerySelectorAll:()=>$});var a=class{static async*map(e,r){for await(let o of e)yield await r(o)}static async*flatMap(e,r){for await(let o of e)yield*r(o)}static async collect(e){let r=[];for await(let o of e)r.push(o);return r}static async first(e){for await(let r of e)return r}};var C={};l(C,{textQuerySelectorAll:()=>m});var re=new Set([\"checkbox\",\"image\",\"radio\"]),oe=t=>t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!re.has(t.type),se=new Set([\"SCRIPT\",\"STYLE\"]),f=t=>!se.has(t.nodeName)&&!document.head?.contains(t),I=new WeakMap,F=t=>{for(;t;)I.delete(t),t instanceof ShadowRoot?t=t.host:t=t.parentNode},j=new WeakSet,ne=new MutationObserver(t=>{for(let e of t)F(e.target)}),d=t=>{let e=I.get(t);if(e||(e={full:\"\",immediate:[]},!f(t)))return e;let r=\"\";if(oe(t))e.full=t.value,e.immediate.push(t.value),t.addEventListener(\"input\",o=>{F(o.target)},{once:!0,capture:!0});else{for(let o=t.firstChild;o;o=o.nextSibling){if(o.nodeType===Node.TEXT_NODE){e.full+=o.nodeValue??\"\",r+=o.nodeValue??\"\";continue}r&&e.immediate.push(r),r=\"\",o.nodeType===Node.ELEMENT_NODE&&(e.full+=d(o).full)}r&&e.immediate.push(r),t instanceof Element&&t.shadowRoot&&(e.full+=d(t.shadowRoot).full),j.has(t)||(ne.observe(t,{childList:!0,characterData:!0,subtree:!0}),j.add(t))}return I.set(t,e),e};var m=function*(t,e){let r=!1;for(let o of t.childNodes)if(o instanceof Element&&f(o)){let s;o.shadowRoot?s=m(o.shadowRoot,e):s=m(o,e);for(let i of s)yield i,r=!0}r||t instanceof Element&&f(t)&&d(t).full.includes(e)&&(yield t)};var k={};l(k,{checkVisibility:()=>le,pierce:()=>S,pierceAll:()=>O});var ie=[\"hidden\",\"collapse\"],le=(t,e)=>{if(!t)return e===!1;if(e===void 0)return t;let r=t.nodeType===Node.TEXT_NODE?t.parentElement:t,o=window.getComputedStyle(r),s=o&&!ie.includes(o.visibility)&&!ae(r);return e===s?t:!1};function ae(t){let e=t.getBoundingClientRect();return e.width===0||e.height===0}var ce=t=>\"shadowRoot\"in t&&t.shadowRoot instanceof ShadowRoot;function*S(t){ce(t)?yield t.shadowRoot:yield t}function*O(t){t=S(t).next().value,yield t;let e=[document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT)];for(let r of e){let o;for(;o=r.nextNode();)o.shadowRoot&&(yield o.shadowRoot,e.push(document.createTreeWalker(o.shadowRoot,NodeFilter.SHOW_ELEMENT)))}}var D={};l(D,{xpathQuerySelectorAll:()=>q});var q=function*(t,e,r=-1){let s=(t.ownerDocument||document).evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE),i=[],n;for(;(n=s.iterateNext())&&(i.push(n),!(r&&i.length===r)););for(let h=0;h<i.length;h++)n=i[h],yield n,
|
|
8
|
+
export const source = "\"use strict\";var g=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var Y=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var r in e)g(t,r,{get:e[r],enumerable:!0})},G=(t,e,r,o)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let s of B(e))!Y.call(t,s)&&s!==r&&g(t,s,{get:()=>e[s],enumerable:!(o=X(e,s))||o.enumerable});return t};var J=t=>G(g({},\"__esModule\",{value:!0}),t);var pe={};l(pe,{default:()=>he});module.exports=J(pe);var N=class extends Error{constructor(e,r){super(e,r),this.name=this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}},p=class extends N{};var c=class t{static create(e){return new t(e)}static async race(e){let r=new Set;try{let o=e.map(s=>s instanceof t?(s.#s&&r.add(s),s.valueOrThrow()):s);return await Promise.race(o)}finally{for(let o of r)o.reject(new Error(\"Timeout cleared\"))}}#e=!1;#r=!1;#o;#t;#a=new Promise(e=>{this.#t=e});#s;#i;constructor(e){e&&e.timeout>0&&(this.#i=new p(e.message),this.#s=setTimeout(()=>{this.reject(this.#i)},e.timeout))}#l(e){clearTimeout(this.#s),this.#o=e,this.#t()}resolve(e){this.#r||this.#e||(this.#e=!0,this.#l(e))}reject(e){this.#r||this.#e||(this.#r=!0,this.#l(e))}resolved(){return this.#e}finished(){return this.#e||this.#r}value(){return this.#o}#n;valueOrThrow(){return this.#n||(this.#n=(async()=>{if(await this.#a,this.#r)throw this.#o;return this.#o})()),this.#n}};var L=new Map,W=t=>{let e=L.get(t);return e||(e=new Function(`return ${t}`)(),L.set(t,e),e)};var b={};l(b,{ariaQuerySelector:()=>z,ariaQuerySelectorAll:()=>x});var z=(t,e)=>globalThis.__ariaQuerySelector(t,e),x=async function*(t,e){yield*await globalThis.__ariaQuerySelectorAll(t,e)};var E={};l(E,{cssQuerySelector:()=>K,cssQuerySelectorAll:()=>Z});var K=(t,e)=>t.querySelector(e),Z=function(t,e){return t.querySelectorAll(e)};var A={};l(A,{customQuerySelectors:()=>P});var v=class{#e=new Map;register(e,r){if(!r.queryOne&&r.queryAll){let o=r.queryAll;r.queryOne=(s,i)=>{for(let n of o(s,i))return n;return null}}else if(r.queryOne&&!r.queryAll){let o=r.queryOne;r.queryAll=(s,i)=>{let n=o(s,i);return n?[n]:[]}}else if(!r.queryOne||!r.queryAll)throw new Error(\"At least one query method must be defined.\");this.#e.set(e,{querySelector:r.queryOne,querySelectorAll:r.queryAll})}unregister(e){this.#e.delete(e)}get(e){return this.#e.get(e)}clear(){this.#e.clear()}},P=new v;var R={};l(R,{pierceQuerySelector:()=>ee,pierceQuerySelectorAll:()=>te});var ee=(t,e)=>{let r=null,o=s=>{let i=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT);do{let n=i.currentNode;n.shadowRoot&&o(n.shadowRoot),!(n instanceof ShadowRoot)&&n!==s&&!r&&n.matches(e)&&(r=n)}while(!r&&i.nextNode())};return t instanceof Document&&(t=t.documentElement),o(t),r},te=(t,e)=>{let r=[],o=s=>{let i=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT);do{let n=i.currentNode;n.shadowRoot&&o(n.shadowRoot),!(n instanceof ShadowRoot)&&n!==s&&n.matches(e)&&r.push(n)}while(i.nextNode())};return t instanceof Document&&(t=t.documentElement),o(t),r};var u=(t,e)=>{if(!t)throw new Error(e)};var y=class{#e;#r;#o;#t;constructor(e,r){this.#e=e,this.#r=r}async start(){let e=this.#t=c.create(),r=await this.#e();if(r){e.resolve(r);return}this.#o=new MutationObserver(async()=>{let o=await this.#e();o&&(e.resolve(o),await this.stop())}),this.#o.observe(this.#r,{childList:!0,subtree:!0,attributes:!0})}async stop(){u(this.#t,\"Polling never started.\"),this.#t.finished()||this.#t.reject(new Error(\"Polling stopped\")),this.#o&&(this.#o.disconnect(),this.#o=void 0)}result(){return u(this.#t,\"Polling never started.\"),this.#t.valueOrThrow()}},w=class{#e;#r;constructor(e){this.#e=e}async start(){let e=this.#r=c.create(),r=await this.#e();if(r){e.resolve(r);return}let o=async()=>{if(e.finished())return;let s=await this.#e();if(!s){window.requestAnimationFrame(o);return}e.resolve(s),await this.stop()};window.requestAnimationFrame(o)}async stop(){u(this.#r,\"Polling never started.\"),this.#r.finished()||this.#r.reject(new Error(\"Polling stopped\"))}result(){return u(this.#r,\"Polling never started.\"),this.#r.valueOrThrow()}},T=class{#e;#r;#o;#t;constructor(e,r){this.#e=e,this.#r=r}async start(){let e=this.#t=c.create(),r=await this.#e();if(r){e.resolve(r);return}this.#o=setInterval(async()=>{let o=await this.#e();o&&(e.resolve(o),await this.stop())},this.#r)}async stop(){u(this.#t,\"Polling never started.\"),this.#t.finished()||this.#t.reject(new Error(\"Polling stopped\")),this.#o&&(clearInterval(this.#o),this.#o=void 0)}result(){return u(this.#t,\"Polling never started.\"),this.#t.valueOrThrow()}};var _={};l(_,{PCombinator:()=>H,pQuerySelector:()=>fe,pQuerySelectorAll:()=>$});var a=class{static async*map(e,r){for await(let o of e)yield await r(o)}static async*flatMap(e,r){for await(let o of e)yield*r(o)}static async collect(e){let r=[];for await(let o of e)r.push(o);return r}static async first(e){for await(let r of e)return r}};var C={};l(C,{textQuerySelectorAll:()=>m});var re=new Set([\"checkbox\",\"image\",\"radio\"]),oe=t=>t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!re.has(t.type),se=new Set([\"SCRIPT\",\"STYLE\"]),f=t=>!se.has(t.nodeName)&&!document.head?.contains(t),I=new WeakMap,F=t=>{for(;t;)I.delete(t),t instanceof ShadowRoot?t=t.host:t=t.parentNode},j=new WeakSet,ne=new MutationObserver(t=>{for(let e of t)F(e.target)}),d=t=>{let e=I.get(t);if(e||(e={full:\"\",immediate:[]},!f(t)))return e;let r=\"\";if(oe(t))e.full=t.value,e.immediate.push(t.value),t.addEventListener(\"input\",o=>{F(o.target)},{once:!0,capture:!0});else{for(let o=t.firstChild;o;o=o.nextSibling){if(o.nodeType===Node.TEXT_NODE){e.full+=o.nodeValue??\"\",r+=o.nodeValue??\"\";continue}r&&e.immediate.push(r),r=\"\",o.nodeType===Node.ELEMENT_NODE&&(e.full+=d(o).full)}r&&e.immediate.push(r),t instanceof Element&&t.shadowRoot&&(e.full+=d(t.shadowRoot).full),j.has(t)||(ne.observe(t,{childList:!0,characterData:!0,subtree:!0}),j.add(t))}return I.set(t,e),e};var m=function*(t,e){let r=!1;for(let o of t.childNodes)if(o instanceof Element&&f(o)){let s;o.shadowRoot?s=m(o.shadowRoot,e):s=m(o,e);for(let i of s)yield i,r=!0}r||t instanceof Element&&f(t)&&d(t).full.includes(e)&&(yield t)};var k={};l(k,{checkVisibility:()=>le,pierce:()=>S,pierceAll:()=>O});var ie=[\"hidden\",\"collapse\"],le=(t,e)=>{if(!t)return e===!1;if(e===void 0)return t;let r=t.nodeType===Node.TEXT_NODE?t.parentElement:t,o=window.getComputedStyle(r),s=o&&!ie.includes(o.visibility)&&!ae(r);return e===s?t:!1};function ae(t){let e=t.getBoundingClientRect();return e.width===0||e.height===0}var ce=t=>\"shadowRoot\"in t&&t.shadowRoot instanceof ShadowRoot;function*S(t){ce(t)?yield t.shadowRoot:yield t}function*O(t){t=S(t).next().value,yield t;let e=[document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT)];for(let r of e){let o;for(;o=r.nextNode();)o.shadowRoot&&(yield o.shadowRoot,e.push(document.createTreeWalker(o.shadowRoot,NodeFilter.SHOW_ELEMENT)))}}var D={};l(D,{xpathQuerySelectorAll:()=>q});var q=function*(t,e,r=-1){let s=(t.ownerDocument||document).evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE),i=[],n;for(;(n=s.iterateNext())&&(i.push(n),!(r&&i.length===r)););for(let h=0;h<i.length;h++)n=i[h],yield n,i[h]=null};var ue=/[-\\w\\P{ASCII}*]/u,H=(r=>(r.Descendent=\">>>\",r.Child=\">>>>\",r))(H||{}),V=t=>\"querySelectorAll\"in t,Q=class{#e;#r=[];#o=void 0;elements;constructor(e,r){this.elements=[e],this.#e=r,this.#t()}async run(){for(typeof this.#o==\"string\"&&this.#o.trimStart()===\":scope\"&&this.#t();this.#o!==void 0;this.#t()){let e=this.#o;typeof e==\"string\"?e[0]&&ue.test(e[0])?this.elements=a.flatMap(this.elements,async function*(r){V(r)&&(yield*r.querySelectorAll(e))}):this.elements=a.flatMap(this.elements,async function*(r){if(!r.parentElement){if(!V(r))return;yield*r.querySelectorAll(e);return}let o=0;for(let s of r.parentElement.children)if(++o,s===r)break;yield*r.parentElement.querySelectorAll(`:scope>:nth-child(${o})${e}`)}):this.elements=a.flatMap(this.elements,async function*(r){switch(e.name){case\"text\":yield*m(r,e.value);break;case\"xpath\":yield*q(r,e.value);break;case\"aria\":yield*x(r,e.value);break;default:let o=P.get(e.name);if(!o)throw new Error(`Unknown selector type: ${e.name}`);yield*o.querySelectorAll(r,e.value)}})}}#t(){if(this.#r.length!==0){this.#o=this.#r.shift();return}if(this.#e.length===0){this.#o=void 0;return}let e=this.#e.shift();switch(e){case\">>>>\":{this.elements=a.flatMap(this.elements,S),this.#t();break}case\">>>\":{this.elements=a.flatMap(this.elements,O),this.#t();break}default:this.#r=e,this.#t();break}}},M=class{#e=new WeakMap;calculate(e,r=[]){if(e===null)return r;e instanceof ShadowRoot&&(e=e.host);let o=this.#e.get(e);if(o)return[...o,...r];let s=0;for(let n=e.previousSibling;n;n=n.previousSibling)++s;let i=this.calculate(e.parentNode,[s]);return this.#e.set(e,i),[...i,...r]}},U=(t,e)=>{if(t.length+e.length===0)return 0;let[r=-1,...o]=t,[s=-1,...i]=e;return r===s?U(o,i):r<s?-1:1},de=async function*(t){let e=new Set;for await(let o of t)e.add(o);let r=new M;yield*[...e.values()].map(o=>[o,r.calculate(o)]).sort(([,o],[,s])=>U(o,s)).map(([o])=>o)},$=function(t,e){let r=JSON.parse(e);if(r.some(o=>{let s=0;return o.some(i=>(typeof i==\"string\"?++s:s=0,s>1))}))throw new Error(\"Multiple deep combinators found in sequence.\");return de(a.flatMap(r,o=>{let s=new Q(t,o);return s.run(),s.elements}))},fe=async function(t,e){for await(let r of $(t,e))return r;return null};var me=Object.freeze({...b,...A,...R,..._,...C,...k,...D,...E,Deferred:c,createFunction:W,createTextContent:d,IntervalPoller:T,isSuitableNodeForTextMatching:f,MutationPoller:y,RAFPoller:w}),he=me;\n";
|
|
@@ -178,6 +178,8 @@ export class ChromeLauncher extends BrowserLauncher {
|
|
|
178
178
|
'MediaRouter',
|
|
179
179
|
'OptimizationHints',
|
|
180
180
|
'RenderDocument', // https://crbug.com/444150315
|
|
181
|
+
'IPH_ReadingModePageActionLabel', // b/479237585
|
|
182
|
+
'ReadAnythingOmniboxChip', // b/479237585
|
|
181
183
|
...(turnOnExperimentalFeaturesForTesting
|
|
182
184
|
? []
|
|
183
185
|
: [
|
|
@@ -155,4 +155,8 @@ export interface LaunchOptions extends ConnectOptions {
|
|
|
155
155
|
* Additional command line arguments to pass to the browser instance.
|
|
156
156
|
*/
|
|
157
157
|
args?: string[];
|
|
158
|
+
/**
|
|
159
|
+
* If provided, the browser will be closed when the signal is aborted.
|
|
160
|
+
*/
|
|
161
|
+
signal?: AbortSignal;
|
|
158
162
|
}
|
|
@@ -313,13 +313,15 @@ export class PuppeteerNode extends Puppeteer {
|
|
|
313
313
|
];
|
|
314
314
|
|
|
315
315
|
// Resolve current buildIds.
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
316
|
+
await Promise.all(
|
|
317
|
+
puppeteerBrowsers.map(async item => {
|
|
318
|
+
const tag =
|
|
319
|
+
this.configuration?.[item.product]?.version ??
|
|
320
|
+
PUPPETEER_REVISIONS[item.product];
|
|
320
321
|
|
|
321
|
-
|
|
322
|
-
|
|
322
|
+
item.currentBuildId = await resolveBuildId(item.browser, platform, tag);
|
|
323
|
+
}),
|
|
324
|
+
);
|
|
323
325
|
|
|
324
326
|
const currentBrowserBuilds = new Set(
|
|
325
327
|
puppeteerBrowsers.map(browser => {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
10
|
export const PUPPETEER_REVISIONS = Object.freeze({
|
|
11
|
-
chrome: '
|
|
12
|
-
'chrome-headless-shell': '
|
|
13
|
-
firefox: 'stable_147.0.
|
|
11
|
+
chrome: '145.0.7632.46',
|
|
12
|
+
'chrome-headless-shell': '145.0.7632.46',
|
|
13
|
+
firefox: 'stable_147.0.3',
|
|
14
14
|
});
|