Skip to content

[WebCryptoAPI] Improve test coverage and reduce duplication#61397

Open
panva wants to merge 30 commits into
web-platform-tests:masterfrom
panva:update-wpt-webcrypto
Open

[WebCryptoAPI] Improve test coverage and reduce duplication#61397
panva wants to merge 30 commits into
web-platform-tests:masterfrom
panva:update-wpt-webcrypto

Conversation

@panva

@panva panva commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Fixes

  • Correct byte utility assertions and buffer-view encoding.
  • Await ML-KEM key exports correctly.
  • Verify EdDSA known-answer signatures before generated signatures.
  • Check derived keys and CryptoKey properties completely.
  • Preserve setup failures and restore appropriate test timeouts.
  • Assert key usages exactly.

Improvements

  • Expand invalid key-usage coverage.
  • Modernize JavaScript syntax and asynchronous test flows.
  • Share common fixtures across algorithms and key formats.
  • Consolidate digest, XOF, KDF, ECDH, MAC, signature, and support test runners.
  • Reduce duplicated setup and algorithm-specific test logic.
  • Scope test state locally and simplify vector handling.

panva added 30 commits July 19, 2026 10:10
@panva

panva commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

All 3288 additions are Bad usages: ... coverage:

  • 1816 generateKey() failure cases across 18 files
  • 1472 importKey() failure cases across 6 files

The only removals are bookkeeping tests named setup:

  • sign_verify/ecdsa.https.any.js
  • sign_verify/mldsa.tentative.https.any.js
  • sign_verify/rsa_pkcs.https.any.js
  • sign_verify/rsa_pss.https.any.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants