chrome-devtools-frontend 1.0.1667564 → 1.0.1669021
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/skills/devtools-ci/SKILL.md +65 -0
- package/.agents/skills/devtools-setting-migration/SKILL.md +290 -0
- package/.agents/skills/gerrit-cli/SKILL.md +59 -0
- package/.agents/skills/gerrit-cli/references/commands.md +93 -0
- package/.agents/skills/gerrit-cli/references/workflows.md +56 -0
- package/.agents/skills/gerrit-cli/scripts/gerrit_client_wrapper.py +47 -0
- package/.agents/skills/gerrit-cli/scripts/import_upstream.py +230 -0
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +11 -4
- package/.agents/skills/ui-widgets/SKILL.md +25 -1
- package/docs/contributing/infrastructure.md +7 -1
- package/docs/ui_engineering.md +44 -1
- package/front_end/core/common/Settings.ts +11 -4
- package/front_end/core/host/AidaClient.ts +66 -47
- package/front_end/core/host/GcaClient.ts +4 -6
- package/front_end/core/host/ResourceLoader.ts +4 -2
- package/front_end/core/root/Runtime.ts +5 -5
- package/front_end/core/sdk/CSSModel.test.api.ts +102 -0
- package/front_end/core/sdk/CSSModel.ts +3 -2
- package/front_end/core/sdk/ConsoleModel.ts +3 -2
- package/front_end/core/sdk/DebuggerModel.ts +16 -7
- package/front_end/core/sdk/SDKSettings.ts +38 -0
- package/front_end/core/sdk/sdk-meta.ts +0 -120
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/main/MainImpl.ts +10 -3
- package/front_end/foundation/Universe.ts +7 -0
- package/front_end/generated/InspectorBackendCommands.ts +2 -2
- package/front_end/generated/protocol.ts +11 -3
- package/front_end/models/ai_assistance/AiAgent2.ts +1 -1
- package/front_end/models/ai_assistance/AiUtils.ts +67 -4
- package/front_end/models/ai_assistance/BuiltInAi.ts +11 -6
- package/front_end/models/ai_assistance/ChangeManager.ts +17 -1
- package/front_end/models/ai_assistance/StorageItem.ts +26 -5
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +2 -19
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +2 -3
- package/front_end/models/javascript_metadata/NativeFunctions.js +22 -9
- package/front_end/models/source_map_scopes/NamesResolver.ts +23 -17
- package/front_end/models/trace/handlers/RendererHandler.ts +20 -4
- package/front_end/models/trace/types/File.ts +1 -0
- package/front_end/models/workspace/UISourceCode.ts +0 -10
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +61 -182
- package/front_end/panels/ai_assistance/components/ChatInput.ts +25 -8
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +13 -69
- package/front_end/panels/ai_assistance/components/ChatView.ts +14 -8
- package/front_end/panels/ai_assistance/components/chatMessage.css +2 -20
- package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -2
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +41 -3
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +131 -134
- package/front_end/panels/application/ServiceWorkersView.ts +8 -8
- package/front_end/panels/application/application.ts +2 -0
- package/front_end/panels/application/components/AdsView.ts +10 -6
- package/front_end/panels/application/preloading/PreloadingView.ts +53 -45
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +111 -119
- package/front_end/panels/application/preloading/components/preloadingDetailsReportView.css +22 -24
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +105 -102
- package/front_end/panels/common/AiCodeCompletionDisclaimer.ts +107 -96
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +17 -19
- package/front_end/panels/common/AiCodeCompletionTeaser.ts +6 -6
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +28 -26
- package/front_end/panels/common/common.ts +1 -1
- package/front_end/panels/console/ConsoleInsightTeaser.ts +6 -8
- package/front_end/panels/console/ConsoleView.ts +6 -4
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
- package/front_end/panels/console/console-meta.ts +28 -0
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +1 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +3 -2
- package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -2
- package/front_end/panels/emulation/DeviceModeView.ts +63 -104
- package/front_end/panels/emulation/DeviceModeWrapper.ts +18 -4
- package/front_end/panels/explain/components/ConsoleInsight.ts +4 -6
- package/front_end/panels/explain/explain-meta.ts +7 -49
- package/front_end/panels/network/NetworkDataGridNode.ts +1 -1
- package/front_end/panels/network/NetworkLogView.ts +1 -0
- package/front_end/panels/network/OriginalResourceChunkView.ts +340 -0
- package/front_end/panels/network/ResourceChunkView.ts +72 -46
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +3 -2
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +3 -3
- package/front_end/panels/network/originalResourceChunkView.css +49 -0
- package/front_end/panels/screencast/ScreencastView.ts +401 -260
- package/front_end/panels/screencast/screencastView.css +113 -100
- package/front_end/panels/sensors/LocationsSettingsTab.ts +329 -135
- package/front_end/panels/sensors/locationsSettingsTab.css +78 -4
- package/front_end/panels/settings/AISettingsTab.ts +17 -100
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +2 -2
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +4 -4
- package/front_end/panels/sources/AddSourceMapURLDialog.ts +3 -3
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +4 -3
- package/front_end/panels/sources/BreakpointEditDialog.ts +14 -14
- package/front_end/panels/sources/BreakpointsView.ts +14 -14
- package/front_end/panels/sources/CallStackSidebarPane.ts +6 -6
- package/front_end/panels/sources/CategorizedBreakpointL10n.ts +18 -18
- package/front_end/panels/sources/CoveragePlugin.ts +7 -7
- package/front_end/panels/sources/DebuggerPausedMessage.ts +23 -23
- package/front_end/panels/sources/DebuggerPlugin.ts +31 -31
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +2 -2
- package/front_end/panels/sources/GoToLineQuickOpen.ts +10 -10
- package/front_end/panels/sources/NavigatorView.ts +34 -27
- package/front_end/panels/sources/OutlineQuickOpen.ts +3 -3
- package/front_end/panels/sources/PersistenceActions.ts +9 -9
- package/front_end/panels/sources/ProfilePlugin.ts +1 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +5 -5
- package/front_end/panels/sources/SnippetsPlugin.ts +2 -2
- package/front_end/panels/sources/SourcesNavigator.ts +20 -18
- package/front_end/panels/sources/SourcesPanel.ts +26 -25
- package/front_end/panels/sources/SourcesView.ts +5 -6
- package/front_end/panels/sources/TabbedEditorContainer.ts +3 -3
- package/front_end/panels/sources/ThreadsSidebarPane.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +0 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +7 -7
- package/front_end/panels/sources/components/HeadersView.ts +2 -2
- package/front_end/panels/sources/sources-meta.ts +164 -71
- package/front_end/panels/sources/sources.ts +0 -2
- package/front_end/panels/timeline/TimelineHistoryManager.ts +14 -3
- package/front_end/panels/timeline/TimelineLoader.ts +72 -42
- package/front_end/panels/timeline/TimelinePanel.ts +29 -4
- package/front_end/panels/timeline/timelineHistoryManager.css +4 -0
- 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/es5-iife/puppeteer-core-browser.d.ts +187 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +91 -38
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +145 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js +0 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts +0 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js +0 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Dialog.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Dialog.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Dialog.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Dialog.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/JSHandle.d.ts +0 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/JSHandle.js +0 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +0 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.d.ts +0 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js +12 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js +4 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +49 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.d.ts +0 -6
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js +0 -6
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/util.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts +0 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js +0 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/disposable.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/disposable.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +187 -1
- package/front_end/third_party/puppeteer/package/package.json +5 -5
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +155 -2
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +0 -2
- package/front_end/third_party/puppeteer/package/src/api/Dialog.ts +10 -2
- package/front_end/third_party/puppeteer/package/src/api/JSHandle.ts +0 -2
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +1 -3
- package/front_end/third_party/puppeteer/package/src/api/Realm.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/bidi/BidiOverCdp.ts +4 -2
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +17 -0
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPResponse.ts +5 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +66 -0
- package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +0 -6
- package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/injected/util.ts +4 -1
- package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +0 -3
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/disposable.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +9 -7
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +7 -8
- package/front_end/ui/legacy/Dialog.ts +103 -4
- package/front_end/ui/legacy/InspectorView.ts +1 -5
- package/front_end/ui/legacy/PopoverHelper.ts +5 -5
- package/front_end/ui/legacy/TabbedPane.ts +7 -2
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +40 -24
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +8 -4
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +14 -7
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +11 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/package.json +1 -1
- package/front_end/panels/sources/AiWarningInfobarPlugin.ts +0 -78
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
});
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
ResourceTreeModel,
|
|
26
26
|
} from './ResourceTreeModel.js';
|
|
27
27
|
import {SDKModel} from './SDKModel.js';
|
|
28
|
+
import {cssSourceMapsEnabledSettingDescriptor} from './SDKSettings.js';
|
|
28
29
|
import {SourceMapManager} from './SourceMapManager.js';
|
|
29
30
|
import {Capability, type Target} from './Target.js';
|
|
30
31
|
|
|
@@ -81,8 +82,8 @@ export class CSSModel extends SDKModel<EventTypes> {
|
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
const settings = this.target().targetManager().settings;
|
|
84
|
-
this.#sourceMapManager.setEnabled(settings.
|
|
85
|
-
settings.
|
|
85
|
+
this.#sourceMapManager.setEnabled(settings.resolve(cssSourceMapsEnabledSettingDescriptor).get());
|
|
86
|
+
settings.resolve(cssSourceMapsEnabledSettingDescriptor)
|
|
86
87
|
.addChangeListener(event => this.#sourceMapManager.setEnabled(event.data));
|
|
87
88
|
}
|
|
88
89
|
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
RuntimeModel,
|
|
35
35
|
} from './RuntimeModel.js';
|
|
36
36
|
import {SDKModel} from './SDKModel.js';
|
|
37
|
+
import {preserveConsoleLogSettingDescriptor} from './SDKSettings.js';
|
|
37
38
|
import {Capability, type Target, Type} from './Target.js';
|
|
38
39
|
import type {TargetManager} from './TargetManager.js';
|
|
39
40
|
|
|
@@ -287,7 +288,7 @@ export class ConsoleModel extends SDKModel<EventTypes> {
|
|
|
287
288
|
|
|
288
289
|
private clearIfNecessary(): void {
|
|
289
290
|
const settings = this.target().targetManager().settings;
|
|
290
|
-
if (!settings.
|
|
291
|
+
if (!settings.resolve(preserveConsoleLogSettingDescriptor).get()) {
|
|
291
292
|
this.clear();
|
|
292
293
|
}
|
|
293
294
|
++this.#pageLoadSequenceNumber;
|
|
@@ -296,7 +297,7 @@ export class ConsoleModel extends SDKModel<EventTypes> {
|
|
|
296
297
|
private primaryPageChanged(
|
|
297
298
|
event: Common.EventTarget.EventTargetEvent<{frame: ResourceTreeFrame, type: PrimaryPageChangeType}>): void {
|
|
298
299
|
const settings = this.target().targetManager().settings;
|
|
299
|
-
if (settings.
|
|
300
|
+
if (settings.resolve(preserveConsoleLogSettingDescriptor).get()) {
|
|
300
301
|
const {frame} = event.data;
|
|
301
302
|
if (frame.backForwardCacheDetails.restoredFromCache) {
|
|
302
303
|
this.#console.log(i18nString(UIStrings.bfcacheNavigation, {PH1: frame.url}));
|
|
@@ -15,6 +15,11 @@ import {Events as ResourceTreeModelEvents, ResourceTreeModel} from './ResourceTr
|
|
|
15
15
|
import {type EvaluationOptions, type EvaluationResult, type ExecutionContext, RuntimeModel} from './RuntimeModel.js';
|
|
16
16
|
import {Script} from './Script.js';
|
|
17
17
|
import {SDKModel} from './SDKModel.js';
|
|
18
|
+
import {
|
|
19
|
+
jsSourceMapsEnabledSettingDescriptor,
|
|
20
|
+
pauseOnCaughtExceptionSettingDescriptor,
|
|
21
|
+
pauseOnExceptionEnabledSettingDescriptor,
|
|
22
|
+
} from './SDKSettings.js';
|
|
18
23
|
import {SourceMap} from './SourceMap.js';
|
|
19
24
|
import {SourceMapManager} from './SourceMapManager.js';
|
|
20
25
|
import {Capability, type Target} from './Target.js';
|
|
@@ -174,8 +179,10 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
174
179
|
compiledURL, sourceMappingURL, payload, target.targetManager().getConsole(), script));
|
|
175
180
|
|
|
176
181
|
const settings = this.target().targetManager().settings;
|
|
177
|
-
settings.
|
|
178
|
-
|
|
182
|
+
settings.resolve(pauseOnExceptionEnabledSettingDescriptor)
|
|
183
|
+
.addChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
184
|
+
settings.resolve(pauseOnCaughtExceptionSettingDescriptor)
|
|
185
|
+
.addChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
179
186
|
settings.moduleSetting('pause-on-uncaught-exception').addChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
180
187
|
settings.moduleSetting('disable-async-stack-traces').addChangeListener(this.asyncStackTracesStateChanged, this);
|
|
181
188
|
settings.moduleSetting('breakpoints-active').addChangeListener(this.breakpointsActiveChanged, this);
|
|
@@ -184,8 +191,8 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
184
191
|
void this.enableDebugger();
|
|
185
192
|
}
|
|
186
193
|
|
|
187
|
-
this.#sourceMapManager.setEnabled(settings.
|
|
188
|
-
settings.
|
|
194
|
+
this.#sourceMapManager.setEnabled(settings.resolve(jsSourceMapsEnabledSettingDescriptor).get());
|
|
195
|
+
settings.resolve(jsSourceMapsEnabledSettingDescriptor)
|
|
189
196
|
.addChangeListener(event => this.#sourceMapManager.setEnabled((event.data as boolean)));
|
|
190
197
|
|
|
191
198
|
const resourceTreeModel = (target.model(ResourceTreeModel) as ResourceTreeModel);
|
|
@@ -355,7 +362,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
355
362
|
|
|
356
363
|
private pauseOnExceptionStateChanged(): void {
|
|
357
364
|
const settings = this.target().targetManager().settings;
|
|
358
|
-
const pauseOnCaughtEnabled = settings.
|
|
365
|
+
const pauseOnCaughtEnabled = settings.resolve(pauseOnCaughtExceptionSettingDescriptor).get();
|
|
359
366
|
let state: Protocol.Debugger.SetPauseOnExceptionsRequestState;
|
|
360
367
|
|
|
361
368
|
const pauseOnUncaughtEnabled = settings.moduleSetting('pause-on-uncaught-exception').get();
|
|
@@ -867,8 +874,10 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
867
874
|
debuggerIdToModel.delete(this.#debuggerId);
|
|
868
875
|
}
|
|
869
876
|
const settings = this.target().targetManager().settings;
|
|
870
|
-
settings.
|
|
871
|
-
|
|
877
|
+
settings.resolve(pauseOnExceptionEnabledSettingDescriptor)
|
|
878
|
+
.removeChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
879
|
+
settings.resolve(pauseOnCaughtExceptionSettingDescriptor)
|
|
880
|
+
.removeChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
872
881
|
settings.moduleSetting('disable-async-stack-traces').removeChangeListener(this.asyncStackTracesStateChanged, this);
|
|
873
882
|
}
|
|
874
883
|
|
|
@@ -0,0 +1,38 @@
|
|
|
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 * as Common from '../common/common.js';
|
|
6
|
+
|
|
7
|
+
export const jsSourceMapsEnabledSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
8
|
+
name: 'js-source-maps-enabled',
|
|
9
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
10
|
+
defaultValue: true,
|
|
11
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const cssSourceMapsEnabledSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
15
|
+
name: 'css-source-maps-enabled',
|
|
16
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
17
|
+
defaultValue: true,
|
|
18
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const preserveConsoleLogSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
22
|
+
name: 'preserve-console-log',
|
|
23
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
24
|
+
defaultValue: false,
|
|
25
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const pauseOnExceptionEnabledSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
29
|
+
name: 'pause-on-exception-enabled',
|
|
30
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
31
|
+
defaultValue: false,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const pauseOnCaughtExceptionSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
35
|
+
name: 'pause-on-caught-exception',
|
|
36
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
37
|
+
defaultValue: false,
|
|
38
|
+
};
|
|
@@ -6,22 +6,6 @@ import * as Common from '../common/common.js';
|
|
|
6
6
|
import * as i18n from '../i18n/i18n.js';
|
|
7
7
|
|
|
8
8
|
const UIStrings = {
|
|
9
|
-
/**
|
|
10
|
-
* @description Title of a setting under the Console category that can be invoked through the Command Menu.
|
|
11
|
-
*/
|
|
12
|
-
preserveLogUponNavigation: 'Keep log on navigation',
|
|
13
|
-
/**
|
|
14
|
-
* @description Title of a setting under the Console category that can be invoked through the Command Menu.
|
|
15
|
-
*/
|
|
16
|
-
doNotPreserveLogUponNavigation: 'Don’t keep log on navigation',
|
|
17
|
-
/**
|
|
18
|
-
* @description Text for pausing the debugger on exceptions.
|
|
19
|
-
*/
|
|
20
|
-
pauseOnExceptions: 'Pause on exceptions',
|
|
21
|
-
/**
|
|
22
|
-
* @description Title of a setting under the Debugger category that can be invoked through the Command Menu.
|
|
23
|
-
*/
|
|
24
|
-
doNotPauseOnExceptions: 'Do not pause on exceptions',
|
|
25
9
|
/**
|
|
26
10
|
* @description Title of a setting under the Debugger category that can be invoked through the Command Menu.
|
|
27
11
|
*/
|
|
@@ -452,30 +436,6 @@ const UIStrings = {
|
|
|
452
436
|
*/
|
|
453
437
|
networkCacheExplanation:
|
|
454
438
|
'Disabling the network cache will simulate a network experience similar to a first time visitor.',
|
|
455
|
-
/**
|
|
456
|
-
* @description Setting under the Sources category to toggle usage of JavaScript source maps.
|
|
457
|
-
*/
|
|
458
|
-
javaScriptSourceMaps: 'JavaScript source maps',
|
|
459
|
-
/**
|
|
460
|
-
* @description Title of an option under the Sources category that can be invoked through the Command Menu.
|
|
461
|
-
*/
|
|
462
|
-
enableJavaScriptSourceMaps: 'Enable JavaScript source maps',
|
|
463
|
-
/**
|
|
464
|
-
* @description Title of an option under the Sources category that can be invoked through the Command Menu.
|
|
465
|
-
*/
|
|
466
|
-
disableJavaScriptSourceMaps: 'Disable JavaScript source maps',
|
|
467
|
-
/**
|
|
468
|
-
* @description Title of a setting under the Sources category.
|
|
469
|
-
*/
|
|
470
|
-
cssSourceMaps: 'CSS source maps',
|
|
471
|
-
/**
|
|
472
|
-
* @description Title of an option under the Sources category that can be invoked through the Command Menu.
|
|
473
|
-
*/
|
|
474
|
-
enableCssSourceMaps: 'Enable CSS source maps',
|
|
475
|
-
/**
|
|
476
|
-
* @description Title of an option under the Sources category that can be invoked through the Command Menu.
|
|
477
|
-
*/
|
|
478
|
-
disableCssSourceMaps: 'Disable CSS source maps',
|
|
479
439
|
/**
|
|
480
440
|
* @description Title of a setting under the Console category in Settings.
|
|
481
441
|
*/
|
|
@@ -495,48 +455,6 @@ const UIStrings = {
|
|
|
495
455
|
const str_ = i18n.i18n.registerUIStrings('core/sdk/sdk-meta.ts', UIStrings);
|
|
496
456
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
497
457
|
|
|
498
|
-
Common.Settings.registerSettingExtension({
|
|
499
|
-
category: Common.Settings.SettingCategory.CONSOLE,
|
|
500
|
-
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
501
|
-
title: i18nLazyString(UIStrings.preserveLogUponNavigation),
|
|
502
|
-
settingName: 'preserve-console-log',
|
|
503
|
-
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
504
|
-
defaultValue: false,
|
|
505
|
-
options: [
|
|
506
|
-
{
|
|
507
|
-
value: true,
|
|
508
|
-
title: i18nLazyString(UIStrings.preserveLogUponNavigation),
|
|
509
|
-
},
|
|
510
|
-
{
|
|
511
|
-
value: false,
|
|
512
|
-
title: i18nLazyString(UIStrings.doNotPreserveLogUponNavigation),
|
|
513
|
-
},
|
|
514
|
-
],
|
|
515
|
-
});
|
|
516
|
-
|
|
517
|
-
Common.Settings.registerSettingExtension({
|
|
518
|
-
category: Common.Settings.SettingCategory.DEBUGGER,
|
|
519
|
-
settingName: 'pause-on-exception-enabled',
|
|
520
|
-
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
521
|
-
defaultValue: false,
|
|
522
|
-
options: [
|
|
523
|
-
{
|
|
524
|
-
value: true,
|
|
525
|
-
title: i18nLazyString(UIStrings.pauseOnExceptions),
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
value: false,
|
|
529
|
-
title: i18nLazyString(UIStrings.doNotPauseOnExceptions),
|
|
530
|
-
},
|
|
531
|
-
],
|
|
532
|
-
});
|
|
533
|
-
|
|
534
|
-
Common.Settings.registerSettingExtension({
|
|
535
|
-
settingName: 'pause-on-caught-exception',
|
|
536
|
-
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
537
|
-
defaultValue: false,
|
|
538
|
-
});
|
|
539
|
-
|
|
540
458
|
Common.Settings.registerSettingExtension({
|
|
541
459
|
settingName: 'pause-on-uncaught-exception',
|
|
542
460
|
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
@@ -1391,44 +1309,6 @@ Common.Settings.registerSettingExtension({
|
|
|
1391
1309
|
},
|
|
1392
1310
|
});
|
|
1393
1311
|
|
|
1394
|
-
Common.Settings.registerSettingExtension({
|
|
1395
|
-
category: Common.Settings.SettingCategory.SOURCES,
|
|
1396
|
-
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
1397
|
-
title: i18nLazyString(UIStrings.javaScriptSourceMaps),
|
|
1398
|
-
settingName: 'js-source-maps-enabled',
|
|
1399
|
-
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
1400
|
-
defaultValue: true,
|
|
1401
|
-
options: [
|
|
1402
|
-
{
|
|
1403
|
-
value: true,
|
|
1404
|
-
title: i18nLazyString(UIStrings.enableJavaScriptSourceMaps),
|
|
1405
|
-
},
|
|
1406
|
-
{
|
|
1407
|
-
value: false,
|
|
1408
|
-
title: i18nLazyString(UIStrings.disableJavaScriptSourceMaps),
|
|
1409
|
-
},
|
|
1410
|
-
],
|
|
1411
|
-
});
|
|
1412
|
-
|
|
1413
|
-
Common.Settings.registerSettingExtension({
|
|
1414
|
-
category: Common.Settings.SettingCategory.SOURCES,
|
|
1415
|
-
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
1416
|
-
title: i18nLazyString(UIStrings.cssSourceMaps),
|
|
1417
|
-
settingName: 'css-source-maps-enabled',
|
|
1418
|
-
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
1419
|
-
defaultValue: true,
|
|
1420
|
-
options: [
|
|
1421
|
-
{
|
|
1422
|
-
value: true,
|
|
1423
|
-
title: i18nLazyString(UIStrings.enableCssSourceMaps),
|
|
1424
|
-
},
|
|
1425
|
-
{
|
|
1426
|
-
value: false,
|
|
1427
|
-
title: i18nLazyString(UIStrings.disableCssSourceMaps),
|
|
1428
|
-
},
|
|
1429
|
-
],
|
|
1430
|
-
});
|
|
1431
|
-
|
|
1432
1312
|
Common.Settings.registerSettingExtension({
|
|
1433
1313
|
category: Common.Settings.SettingCategory.CONSOLE,
|
|
1434
1314
|
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
@@ -75,6 +75,7 @@ import * as ScopeTreeCache from './ScopeTreeCache.js';
|
|
|
75
75
|
import * as ScreenCaptureModel from './ScreenCaptureModel.js';
|
|
76
76
|
import * as Script from './Script.js';
|
|
77
77
|
import * as SDKModel from './SDKModel.js';
|
|
78
|
+
import * as SDKSettings from './SDKSettings.js';
|
|
78
79
|
import * as SecurityOriginManager from './SecurityOriginManager.js';
|
|
79
80
|
import * as ServerSentEventProtocol from './ServerSentEventsProtocol.js';
|
|
80
81
|
import * as ServerTiming from './ServerTiming.js';
|
|
@@ -160,6 +161,7 @@ export {
|
|
|
160
161
|
ScreenCaptureModel,
|
|
161
162
|
Script,
|
|
162
163
|
SDKModel,
|
|
164
|
+
SDKSettings,
|
|
163
165
|
SecurityOriginManager,
|
|
164
166
|
ServerSentEventProtocol,
|
|
165
167
|
ServerTiming,
|
|
@@ -373,8 +373,15 @@ export class MainImpl {
|
|
|
373
373
|
Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR, protocolMonitorExperiment);
|
|
374
374
|
|
|
375
375
|
// Debugging
|
|
376
|
-
Root.Runtime.experiments.
|
|
377
|
-
|
|
376
|
+
const instrumentationBreakpointsExperiment = Root.Runtime.experiments.registerHostExperiment({
|
|
377
|
+
name: Root.ExperimentNames.ExperimentName.INSTRUMENTATION_BREAKPOINTS,
|
|
378
|
+
title: 'Instrumentation breakpoints',
|
|
379
|
+
aboutFlag: 'devtools-instrumentation-breakpoints',
|
|
380
|
+
isEnabled: Root.Runtime.hostConfig.devToolsInstrumentationBreakpoints?.enabled ?? false,
|
|
381
|
+
requiresChromeRestart: false,
|
|
382
|
+
});
|
|
383
|
+
this.#migrateValueFromLegacyToHostExperiment(Root.ExperimentNames.ExperimentName.INSTRUMENTATION_BREAKPOINTS,
|
|
384
|
+
instrumentationBreakpointsExperiment);
|
|
378
385
|
|
|
379
386
|
Root.Runtime.experiments.registerHostExperiment({
|
|
380
387
|
name: Root.ExperimentNames.ExperimentName.DURABLE_MESSAGES,
|
|
@@ -471,7 +478,7 @@ export class MainImpl {
|
|
|
471
478
|
void this.#universe.liveMetrics.enable();
|
|
472
479
|
CrUXManager.CrUXManager.instance();
|
|
473
480
|
|
|
474
|
-
const builtInAi =
|
|
481
|
+
const builtInAi = this.#universe.builtInAi;
|
|
475
482
|
builtInAi.addEventListener(
|
|
476
483
|
AiAssistanceModel.BuiltInAi.Events.DOWNLOADED_AND_SESSION_CREATED,
|
|
477
484
|
() => Snackbar.Snackbar.Snackbar.show({message: i18nString(UIStrings.aiModelDownloaded)}));
|
|
@@ -216,6 +216,9 @@ export class Universe {
|
|
|
216
216
|
const aiHistoryStorage = new AiAssistance.AiHistoryStorage.AiHistoryStorage(settings);
|
|
217
217
|
context.set(AiAssistance.AiHistoryStorage.AiHistoryStorage, aiHistoryStorage);
|
|
218
218
|
|
|
219
|
+
const builtInAi = new AiAssistance.BuiltInAi.BuiltInAi();
|
|
220
|
+
context.set(AiAssistance.BuiltInAi.BuiltInAi, builtInAi);
|
|
221
|
+
|
|
219
222
|
this.autofillManager = new AutofillManager.AutofillManager.AutofillManager(targetManager, frameManager);
|
|
220
223
|
context.set(AutofillManager.AutofillManager.AutofillManager, this.autofillManager);
|
|
221
224
|
}
|
|
@@ -233,6 +236,10 @@ export class Universe {
|
|
|
233
236
|
return this.context.get(AiAssistance.AiHistoryStorage.AiHistoryStorage);
|
|
234
237
|
}
|
|
235
238
|
|
|
239
|
+
get builtInAi(): AiAssistance.BuiltInAi.BuiltInAi {
|
|
240
|
+
return this.context.get(AiAssistance.BuiltInAi.BuiltInAi);
|
|
241
|
+
}
|
|
242
|
+
|
|
236
243
|
get breakpointManager(): Breakpoints.BreakpointManager.BreakpointManager {
|
|
237
244
|
return this.context.get(Breakpoints.BreakpointManager.BreakpointManager);
|
|
238
245
|
}
|
|
@@ -1487,9 +1487,9 @@ inspectorBackend.registerCommand("WebAuthn.removeCredential", [{"name": "authent
|
|
|
1487
1487
|
inspectorBackend.registerCommand("WebAuthn.clearCredentials", [{"name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId"}], [], "Clears all the credentials from the specified device.");
|
|
1488
1488
|
inspectorBackend.registerCommand("WebAuthn.setUserVerified", [{"name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId"}, {"name": "isUserVerified", "type": "boolean", "optional": false, "description": "", "typeRef": null}], [], "Sets whether User Verification succeeds or fails for an authenticator. The default is true.");
|
|
1489
1489
|
inspectorBackend.registerCommand("WebAuthn.setAutomaticPresenceSimulation", [{"name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId"}, {"name": "enabled", "type": "boolean", "optional": false, "description": "", "typeRef": null}], [], "Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. The default is true.");
|
|
1490
|
-
inspectorBackend.registerCommand("WebAuthn.setCredentialProperties", [{"name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId"}, {"name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "backupEligibility", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "backupState", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "activeCmtgKeyIndex", "type": "number", "optional": true, "description": "", "typeRef": null}, {"name": "generateCmtgKeyOnNextOperation", "type": "boolean", "optional": true, "description": "", "typeRef": null}], [], "Allows setting credential properties. https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties");
|
|
1490
|
+
inspectorBackend.registerCommand("WebAuthn.setCredentialProperties", [{"name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId"}, {"name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "backupEligibility", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "backupState", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "activeCmtgKeyIndex", "type": "number", "optional": true, "description": "", "typeRef": null}, {"name": "generateCmtgKeyOnNextOperation", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "signCount", "type": "number", "optional": true, "description": "Must be equal to or greater than -1. If -1, the signature counter is removed from the credential, and every assertion operation will report a value of 0. See https://w3c.github.io/webauthn/#signature-counter", "typeRef": null}], [], "Allows setting credential properties. https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties");
|
|
1491
1491
|
inspectorBackend.registerType("WebAuthn.VirtualAuthenticatorOptions", [{"name": "protocol", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorProtocol"}, {"name": "ctap2Version", "type": "string", "optional": true, "description": "Defaults to ctap2_0. Ignored if |protocol| == u2f.", "typeRef": "WebAuthn.Ctap2Version"}, {"name": "transport", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorTransport"}, {"name": "hasResidentKey", "type": "boolean", "optional": true, "description": "Defaults to false.", "typeRef": null}, {"name": "hasUserVerification", "type": "boolean", "optional": true, "description": "Defaults to false.", "typeRef": null}, {"name": "hasLargeBlob", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the largeBlob extension. https://w3c.github.io/webauthn#largeBlob Defaults to false.", "typeRef": null}, {"name": "hasCredBlob", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the credBlob extension. https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension Defaults to false.", "typeRef": null}, {"name": "hasMinPinLength", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the minPinLength extension. https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension Defaults to false.", "typeRef": null}, {"name": "hasPrf", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the prf extension. https://w3c.github.io/webauthn/#prf-extension Defaults to false.", "typeRef": null}, {"name": "hasHmacSecret", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the hmac-secret extension. https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-hmac-secret-extension Defaults to false.", "typeRef": null}, {"name": "hasHmacSecretMc", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the hmac-secret-mc extension. https://fidoalliance.org/specs/fido-v2.2-rd-20241003/fido-client-to-authenticator-protocol-v2.2-rd-20241003.html#sctn-hmac-secret-make-cred-extension Defaults to false.", "typeRef": null}, {"name": "hasCmtgKey", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the cmtgKey (Credential Manager Trust Group Key) extension. https://github.com/w3c/webauthn/pull/2377 Defaults to false.", "typeRef": null}, {"name": "automaticPresenceSimulation", "type": "boolean", "optional": true, "description": "If set to true, tests of user presence will succeed immediately. Otherwise, they will not be resolved. Defaults to true.", "typeRef": null}, {"name": "isUserVerified", "type": "boolean", "optional": true, "description": "Sets whether User Verification succeeds or fails for an authenticator. Defaults to false.", "typeRef": null}, {"name": "defaultBackupEligibility", "type": "boolean", "optional": true, "description": "Credentials created by this authenticator will have the backup eligibility (BE) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup", "typeRef": null}, {"name": "defaultBackupState", "type": "boolean", "optional": true, "description": "Credentials created by this authenticator will have the backup state (BS) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup", "typeRef": null}]);
|
|
1492
|
-
inspectorBackend.registerType("WebAuthn.Credential", [{"name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "isResidentCredential", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "rpId", "type": "string", "optional": true, "description": "Relying Party ID the credential is scoped to. Must be set when adding a credential.", "typeRef": null}, {"name": "privateKey", "type": "string", "optional": false, "description": "The ECDSA P-256 private key in PKCS#8 format.", "typeRef": null}, {"name": "userHandle", "type": "string", "optional": true, "description": "An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user.", "typeRef": null}, {"name": "signCount", "type": "number", "optional":
|
|
1492
|
+
inspectorBackend.registerType("WebAuthn.Credential", [{"name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "isResidentCredential", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "rpId", "type": "string", "optional": true, "description": "Relying Party ID the credential is scoped to. Must be set when adding a credential.", "typeRef": null}, {"name": "privateKey", "type": "string", "optional": false, "description": "The ECDSA P-256 private key in PKCS#8 format.", "typeRef": null}, {"name": "userHandle", "type": "string", "optional": true, "description": "An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user.", "typeRef": null}, {"name": "signCount", "type": "number", "optional": true, "description": "Signature counter. Must be equal to or greater than -1. If -1, the credential won't have an associated signature counter, and every assertion operation will report a value of 0. See https://w3c.github.io/webauthn/#signature-counter", "typeRef": null}, {"name": "largeBlob", "type": "string", "optional": true, "description": "The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension", "typeRef": null}, {"name": "backupEligibility", "type": "boolean", "optional": true, "description": "Assertions returned by this credential will have the backup eligibility (BE) flag set to this value. Defaults to the authenticator's defaultBackupEligibility value.", "typeRef": null}, {"name": "backupState", "type": "boolean", "optional": true, "description": "Assertions returned by this credential will have the backup state (BS) flag set to this value. Defaults to the authenticator's defaultBackupState value.", "typeRef": null}, {"name": "userName", "type": "string", "optional": true, "description": "The credential's user.name property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name", "typeRef": null}, {"name": "userDisplayName", "type": "string", "optional": true, "description": "The credential's user.displayName property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname", "typeRef": null}, {"name": "cmtgKeys", "type": "array", "optional": true, "description": "The CMTG keys associated with the credential.", "typeRef": "binary"}, {"name": "activeCmtgKeyIndex", "type": "number", "optional": true, "description": "The 0-based index of the active key in cmtgKeys.", "typeRef": null}, {"name": "generateCmtgKeyOnNextOperation", "type": "boolean", "optional": true, "description": "If true, the authenticator will generate a new CMTG key on the next operation.", "typeRef": null}]);
|
|
1493
1493
|
|
|
1494
1494
|
// WebMCP.
|
|
1495
1495
|
inspectorBackend.registerEnum("WebMCP.InvocationStatus", {Completed: "Completed", Canceled: "Canceled", Error: "Error"});
|
|
@@ -20327,11 +20327,12 @@ export namespace WebAuthn {
|
|
|
20327
20327
|
*/
|
|
20328
20328
|
userHandle?: binary;
|
|
20329
20329
|
/**
|
|
20330
|
-
* Signature counter.
|
|
20331
|
-
*
|
|
20330
|
+
* Signature counter. Must be equal to or greater than -1.
|
|
20331
|
+
* If -1, the credential won't have an associated signature counter, and
|
|
20332
|
+
* every assertion operation will report a value of 0.
|
|
20332
20333
|
* See https://w3c.github.io/webauthn/#signature-counter
|
|
20333
20334
|
*/
|
|
20334
|
-
signCount
|
|
20335
|
+
signCount?: integer;
|
|
20335
20336
|
/**
|
|
20336
20337
|
* The large blob associated with the credential.
|
|
20337
20338
|
* See https://w3c.github.io/webauthn/#sctn-large-blob-extension
|
|
@@ -20464,6 +20465,13 @@ export namespace WebAuthn {
|
|
|
20464
20465
|
backupState?: boolean;
|
|
20465
20466
|
activeCmtgKeyIndex?: integer;
|
|
20466
20467
|
generateCmtgKeyOnNextOperation?: boolean;
|
|
20468
|
+
/**
|
|
20469
|
+
* Must be equal to or greater than -1.
|
|
20470
|
+
* If -1, the signature counter is removed from the credential, and every
|
|
20471
|
+
* assertion operation will report a value of 0.
|
|
20472
|
+
* See https://w3c.github.io/webauthn/#signature-counter
|
|
20473
|
+
*/
|
|
20474
|
+
signCount?: integer;
|
|
20467
20475
|
}
|
|
20468
20476
|
|
|
20469
20477
|
/**
|
|
@@ -82,7 +82,7 @@ export class AiAgent2 extends AiAgent<unknown> {
|
|
|
82
82
|
|
|
83
83
|
constructor(opts: AiAgent2Options) {
|
|
84
84
|
super(opts);
|
|
85
|
-
this.#changes = new ChangeManager(opts.targetManager);
|
|
85
|
+
this.#changes = opts.changeManager ?? new ChangeManager(opts.targetManager);
|
|
86
86
|
this.#lighthouseRecording = opts.lighthouseRecording;
|
|
87
87
|
this.#execJs = opts.execJs ?? executeJsCode;
|
|
88
88
|
this.#allowedOrigin = opts.allowedOrigin;
|
|
@@ -4,11 +4,78 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
8
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
9
|
import * as Root from '../../core/root/root.js';
|
|
9
10
|
|
|
10
11
|
import {debugLog} from './debug.js';
|
|
11
12
|
|
|
13
|
+
export const enum DisabledReason {
|
|
14
|
+
GEO_RESTRICTED = 'geo-restricted',
|
|
15
|
+
POLICY_RESTRICTED = 'policy-restricted',
|
|
16
|
+
WRONG_LOCALE = 'wrong-locale',
|
|
17
|
+
NOT_SUPPORTED = 'not-supported',
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function isLocaleRestricted(): boolean {
|
|
21
|
+
try {
|
|
22
|
+
const devtoolsLocale = i18n.DevToolsLocale.DevToolsLocale.instance();
|
|
23
|
+
return !devtoolsLocale.locale.startsWith('en-');
|
|
24
|
+
} catch {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function isGeoRestricted(config?: Root.Runtime.HostConfig): boolean {
|
|
30
|
+
return config?.aidaAvailability?.blockedByGeo === true;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function isPolicyRestricted(config?: Root.Runtime.HostConfig): boolean {
|
|
34
|
+
return config?.aidaAvailability?.blockedByEnterprisePolicy === true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function isConsoleInsightsFeatureEnabled(config?: Root.Runtime.HostConfig): boolean {
|
|
38
|
+
return config?.aidaAvailability?.enabled !== false && config?.devToolsConsoleInsights?.enabled === true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const consoleInsightsEnabledSettingDescriptor:
|
|
42
|
+
Common.Settings.ConditionalSettingDescriptor<boolean, DisabledReason[]> = {
|
|
43
|
+
name: 'console-insights-enabled',
|
|
44
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
45
|
+
defaultValue: false,
|
|
46
|
+
isAvailable: (config?: Root.Runtime.HostConfig): Common.Settings.SettingAvailabilityStatus<DisabledReason[]> => {
|
|
47
|
+
if (!isConsoleInsightsFeatureEnabled(config)) {
|
|
48
|
+
return {
|
|
49
|
+
status: Common.Settings.SettingAvailability.UNAVAILABLE,
|
|
50
|
+
reason: [DisabledReason.NOT_SUPPORTED],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const reasons: DisabledReason[] = [];
|
|
54
|
+
if (isGeoRestricted(config)) {
|
|
55
|
+
reasons.push(DisabledReason.GEO_RESTRICTED);
|
|
56
|
+
}
|
|
57
|
+
if (isPolicyRestricted(config)) {
|
|
58
|
+
reasons.push(DisabledReason.POLICY_RESTRICTED);
|
|
59
|
+
}
|
|
60
|
+
if (isLocaleRestricted()) {
|
|
61
|
+
reasons.push(DisabledReason.WRONG_LOCALE);
|
|
62
|
+
}
|
|
63
|
+
if (reasons.length > 0) {
|
|
64
|
+
return {
|
|
65
|
+
status: Common.Settings.SettingAvailability.DISABLED,
|
|
66
|
+
reason: reasons,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
status: Common.Settings.SettingAvailability.AVAILABLE,
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export function isGeminiBranding(): boolean {
|
|
76
|
+
return !!Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled;
|
|
77
|
+
}
|
|
78
|
+
|
|
12
79
|
/**
|
|
13
80
|
* Preconditions determined entirely on the DevTools frontend side (e.g. Incognito
|
|
14
81
|
* mode or age restrictions) that prevent AI assistance features from running.
|
|
@@ -53,10 +120,6 @@ export function getDisabledReasons(aidaAvailability: Host.AidaClient.AidaAccessP
|
|
|
53
120
|
return reasons;
|
|
54
121
|
}
|
|
55
122
|
|
|
56
|
-
export function isGeminiBranding(): boolean {
|
|
57
|
-
return !!Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
123
|
export function getIconName(): string {
|
|
61
124
|
return isGeminiBranding() ? 'spark' : 'smart-assistant';
|
|
62
125
|
}
|