MCPcopy
hub / github.com/ChromeDevTools/chrome-devtools-mcp / getMockPage

Function getMockPage

tests/utils.ts:337–356  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

335}
336
337export function getMockPage(): Page {
338 const mainFrame = {} as Frame;
339 const cdpSession = {
340 ...mockListener(),
341 send: () => {
342 // no-op
343 },
344 target: () => ({_targetId: '<mock target ID>'}),
345 };
346 return {
347 mainFrame() {
348 return mainFrame;
349 },
350 ...mockListener(),
351 // @ts-expect-error internal API.
352 _client() {
353 return cdpSession;
354 },
355 } satisfies Page;
356}
357
358export function getMockBrowser(): Browser {
359 const pages = [getMockPage()];

Callers 2

getMockBrowserFunction · 0.85

Calls 1

mockListenerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…