Skip to content

Commit 8e74ca3

Browse files
committed
drop diff
Change-Id: Ibf10ea910e34bac5fc44bf13760ceb971680dd35
1 parent 077015f commit 8e74ca3

5 files changed

Lines changed: 11 additions & 120 deletions

File tree

src/McpContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ interface McpContextOptions {
6464
experimentalIncludeAllPages?: boolean;
6565
}
6666

67-
const DEFAULT_TIMEOUT = 30_000;
68-
const NAVIGATION_TIMEOUT = 60_000;
67+
const DEFAULT_TIMEOUT = 5_000;
68+
const NAVIGATION_TIMEOUT = 10_000;
6969

7070
function getNetworkMultiplierFromString(condition: string | null): number {
7171
const puppeteerCondition =

src/main.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ const logDisclaimers = () => {
100100
console.error(
101101
`chrome-devtools-mcp exposes content of the browser instance to the MCP clients allowing them to inspect,
102102
debug, and modify any data in the browser or DevTools.
103-
Avoid sharing sensitive or personal information that you do not want to share with MCP clients.`,
103+
Avoid sharing sensitive or personal information that you do not want to share with MCP clients.
104+
Performance tools may send trace URLs to the Google CrUX API to fetch real-user experience data.`,
104105
);
105106

106107
if (args.usageStatistics) {
@@ -109,10 +110,6 @@ Avoid sharing sensitive or personal information that you do not want to share wi
109110
Google collects usage statistics to improve Chrome DevTools MCP. To opt-out, run with --no-usage-statistics.
110111
For more details, visit: https://github.com/ChromeDevTools/chrome-devtools-mcp#usage-statistics`,
111112
);
112-
}
113-
console.error(
114-
`Performance tools may send trace URLs to the Google CrUX API to fetch real-user experience data.`,
115-
);
116113
};
117114

118115
const toolMutex = new Mutex();

src/manual-perf-test.ts

Lines changed: 0 additions & 110 deletions
This file was deleted.

src/tools/performance.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,18 @@ async function stopTracingAndAppendOutput(
193193
}
194194
}
195195

196+
/** We tell CrUXManager to fetch data so it's available when DevTools.PerformanceTraceFormatter is invoked */
196197
async function populateCruxData(result: TraceResult): Promise<void> {
197198
logger('populateCruxData called');
198199
const cruxManager = DevTools.CrUXManager.CrUXManager.instance();
199200
// go/jtfbx
200201
cruxManager.setEndpointForTesting(
201202
'https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=AIzaSyBn5gimNjhiEyA_euicSKko6IlD3HdgUfk',
202203
);
203-
const settings = DevTools.Common.Settings.Settings.instance();
204-
const cruxSetting = settings.createSetting('field-data', {enabled: true});
204+
const cruxSetting =
205+
DevTools.Common.Settings.Settings.instance().createSetting('field-data', {
206+
enabled: true,
207+
});
205208
cruxSetting.set({enabled: true});
206209

207210
// Gather URLs to fetch CrUX data for
@@ -215,6 +218,7 @@ async function populateCruxData(result: TraceResult): Promise<void> {
215218
logger('No URLs found for CrUX data');
216219
return;
217220
}
221+
218222
logger(
219223
`Fetching CrUX data for ${urlSet.size} URLs: ${Array.from(urlSet).join(', ')}`,
220224
);

tests/McpResponse.test.js.snapshot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ exports[`McpResponse > adds throttling setting when it is not null 1`] = `
7171
# test response
7272
## Network emulation
7373
Emulating: Slow 3G
74-
Default navigation timeout set to 600000 ms
74+
Default navigation timeout set to 100000 ms
7575
`;
7676

7777
exports[`McpResponse > allows response text lines to be added 1`] = `

0 commit comments

Comments
 (0)