Migrate coverage-events test to unit test

This CL migrates the legacy layout test
http/tests/devtools/coverage/coverage-events.js to
CoverageModel.test.ts:

- Starting CoverageModel with TestUniverse and MockCDPConnection and
  verifying URLCoverageInfo is populated on initial poll even with 0
  covered bytes (replacing startCoverage, addScriptTag, pollCoverage).
- Dispatching updated V8 coverage during timed polling, asserting
  URLCoverageInfo.Events.SizesChanged emission, updated used/unused
  bytes/percentages, getContentProvider() binding, and
  100%-covered eval script tracking (usedPercentage() === 0 per
  existing CoverageModel behavior).
- Stopping coverage, resetting CoverageModel, and asserting
  CoverageModel.Events.CoverageReset emission and cleared entries.
- Testing mergeSegments coalescing for adjacent segments with matching
  count and minimum timestamp.

https://crsrc.org/c/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-events.js;drc=54429e487bd407ab311218252267d3943c2d74e3

Bug: 529188572, 528350228
Ai-Assisted: true
Change-Id: I24f1205e4a405607b816e2d612a62cb6777d8a8c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/8842839
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Presubmit-Verified: devtools-frontend-scoped@luci-project-accounts.iam.gserviceaccount.com <devtools-frontend-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alina Varkki <alinavarkki@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
1 file changed
tree: 5efe1254642e5cee6b357543f135a9e3ed15de5d
  1. .agents/
  2. .gemini/
  3. .github/
  4. .vscode/
  5. build_overrides/
  6. config/
  7. docs/
  8. extension-api/
  9. extensions/
  10. front_end/
  11. inspector_overlay/
  12. mcp/
  13. scripts/
  14. test/
  15. third_party/
  16. v8/
  17. .clang-format
  18. .clang-format-ignore
  19. .editorconfig
  20. .env.template
  21. .geminiignore
  22. .git-blame-ignore-revs
  23. .gitallowed
  24. .gitattributes
  25. .gitignore
  26. .gitmodules
  27. .gn
  28. .mailmap
  29. .npmignore
  30. .npmrc
  31. .style.yapf
  32. .stylelintignore
  33. .stylelintrc.json
  34. AUTHORS
  35. BUILD.gn
  36. codereview.settings
  37. CONTRIBUTING.md
  38. DEPS
  39. DIR_METADATA
  40. dt
  41. dt.bat
  42. eslint.config.mjs
  43. favicon.ico
  44. LICENSE
  45. OWNERS
  46. package-lock.json
  47. package.json
  48. PRESUBMIT.py
  49. PRESUBMIT_test.py
  50. README.md
  51. SECURITY.md
  52. vpython.toml
  53. vpython.toml.uv.lock
  54. WATCHLISTS
README.md

Chrome DevTools frontend

npm package

This repository contains the client side of Chrome DevTools. It contains all the TypeScript and CSS code that runs the DevTools web app.

Source code and documentation

The source code is on chromium.googlesource.com.

The Chromium DevTools documentation tells you how to do these tasks:

  • Set up a DevTools frontend checkout.
  • Use a DevTools frontend checkout.
  • Maintain a DevTools frontend checkout.

The documentation also contains design guidelines and architecture documentation.

Other documentation:

Source mirrors

There is a mirror of the DevTools frontend repository on GitHub.

The DevTools frontend is also available on npm as the chrome-devtools-frontend package. The package does not supply CJS modules or ES modules. Thus, it can be difficult to use this package in other tools. For an example of how to use it, see this file.

The version number of the npm package (for example, 1.0.373466) is the Chromium commit position of the latest frontend Git commit. The version number increases with each Chromium commit. But we publish the package only approximately one time each day.

Contact us

Get the latest news

To get the latest news about DevTools development, do one or more of these steps: