Skip to content

Chrome DevTools for coding agents

4.2 KB
Raw Blame
# Copyright 2026 Google LLC
# SPDX-License-Identifier: Apache-2.0

import("//third_party/devtools-frontend/scripts/build/ninja/script_test.gni")
import(
    "//third_party/devtools-frontend/scripts/build/typescript/typescript.gni")

ts_library("tests") {
  testonly = true
  runs_in = "node"

  es_libs = [
    "dom",
    "dom.iterable",
    "ESNext.Disposable",
  ]

  sources = [
    "LogpointManager.test.ts",
    "McpContext.test.ts",
    "McpPage.test.ts",
    "McpResponse.test.ts",
    "McpServer.test.ts",
    "McpWorker.test.ts",
    "NetworkOverrideManager.test.ts",
    "SlimMcpResponse.test.ts",
    "TextSnapshot.test.ts",
    "ToolHandler.test.ts",
    "browser.test.ts",
    "cli-imports.test.ts",
    "cli.test.ts",
    "collectors/PageCollector.test.ts",
    "collectors/ServiceWorkerCollector.test.ts",
    "config/ConfigLocator.test.ts",
    "config/ConfigWatcher.test.ts",
    "config/ServerConfig.test.ts",
    "config/mcp-options.test.ts",
    "daemon/client.test.ts",
    "daemon/symlink.test.ts",
    "daemon/utils.test.ts",
    "devtools/DevToolsCommentBridge.test.ts",
    "devtools/DevtoolsUtils.test.ts",
    "e2e/chrome-devtools-commands.test.ts",
    "e2e/chrome-devtools-disabled-tools.test.ts",
    "e2e/chrome-devtools-disclaimers.test.ts",
    "e2e/chrome-devtools-hyphen-positionals.test.ts",
    "e2e/chrome-devtools-performance.test.ts",
    "e2e/chrome-devtools-start-stop.test.ts",
    "e2e/chrome-devtools-status.test.ts",
    "e2e/telemetry.test.ts",
    "formatters/CommentFormatter.test.ts",
    "formatters/ConsoleFormatter.test.ts",
    "formatters/ConsoleFormatterGrouping.test.ts",
    "formatters/CssFormatter.test.ts",
    "formatters/HeapSnapshotFormatter.test.ts",
    "formatters/IssueFormatter.test.ts",
    "formatters/LogpointFormatter.test.ts",
    "formatters/NetworkFormatter.test.ts",
    "formatters/RemoteObjectFormatter.test.ts",
    "formatters/WebAuthnFormatter.test.ts",
    "formatters/snapshotFormatter.test.ts",
    "index.test.ts",
    "mocks.ts",
    "network_blocking.test.ts",
    "network_overrides.test.ts",
    "processors/HeapSnapshotManager.test.ts",
    "roots.test.ts",
    "server.ts",
    "setup.ts",
    "setupDevTools.ts",
    "shutdown.test.ts",
    "snapshot.ts",
    "telemetry/ClearcutLogger.test.ts",
    "telemetry/WatchdogClient.test.ts",
    "telemetry/flagUtils.test.ts",
    "telemetry/metricsRegistry.test.ts",
    "telemetry/persistence.test.ts",
    "telemetry/transformation.test.ts",
    "telemetry/watchdog/ClearcutSender.test.ts",
    "third_party_notices.test.ts",
    "tools/comments.test.ts",
    "tools/console.test.ts",
    "tools/css.test.ts",
    "tools/emulation.test.ts",
    "tools/extensions.test.ts",
    "tools/input.test.ts",
    "tools/lighthouse.test.ts",
    "tools/logpoints.test.ts",
    "tools/memory.test.ts",
    "tools/network.test.ts",
    "tools/network_override_measurements.test.ts",
    "tools/pages.test.ts",
    "tools/performance.test.ts",
    "tools/pwa.test.ts",
    "tools/screencast.test.ts",
    "tools/screenshot.test.ts",
    "tools/script.test.ts",
    "tools/slim/tools.test.ts",
    "tools/snapshot.test.ts",
    "tools/thirdPartyDeveloper.test.ts",
    "tools/tools.test.ts",
    "tools/webauthn.test.ts",
    "tools/webmcp.test.ts",
    "trace-processing/ChunkedTraceParser.test.ts",
    "trace-processing/fixtures/load.ts",
    "trace-processing/parse.test.ts",
    "utils.ts",
    "utils/TaskRunner.test.ts",
    "utils/WaitForHelper.test.ts",
    "utils/bytes.test.ts",
    "utils/check-for-updates.test.ts",
    "utils/errorHandling.test.ts",
    "utils/files.test.ts",
    "utils/id.test.ts",
    "utils/keyboard.test.ts",
    "utils/logger.test.ts",
    "utils/network.test.ts",
    "utils/pagination.test.ts",
    "utils/raceWithSignal.test.ts",
    "utils/resourceType.test.ts",
    "utils/text.test.ts",
    "utils/timeout.test.ts",
    "utils/url.test.ts",
  ]

  ts_deps = [
    "//src:bin",
    "//src:mcp_lib",
    "//src:third_party",
  ]
}

node_script_test("run_chrome_devtools_mcp_tests") {
  script = "//scripts/test.js"
  args = [
    "--build-dir",
    "@WrappedPath(.)",
  ]
  data = [
    "//node_modules/",
    "//package.json",
    "//tests/",
  ]
  data_deps = [
    ":tests",
    "//:devtools_deps",
    "//src:all",
  ]
}