Files
sousa-gecko/toolkit/components/pdfjs/test/unit
Benjamin Beurdouche 7c1af157fc Bug 1943059 - xpcshell coverage for the signature-verification IPC bridge r=calixte
Adds xpcshell coverage for the two payload validators introduced in
D299536 (`validateVerifyPdfSignatureArgs`, `filterCertsForView`).
These guard `_verifyPdfSignature` / `_viewPdfCertificate` at the
chrome/content boundary, so they need explicit tests independent of
the JSWindowActor plumbing.

Coverage added:
  - `verifyPdfSignature` arg validation rejects missing payload,
    wrong `pkcs7` type, non-array / empty / mixed `detached`, and
    any `signatureType` outside `{0, 1}`; accepts well-formed
    `adbe.pkcs7.detached` and `adbe.pkcs7.sha1` payloads.
  - `viewPdfCertificate` cert filter rejects null / non-array
    input, empty list, > 16 certs, oversized / non-base64 /
    empty-string entries, and preserves valid certs in order.

Differential Revision: https://phabricator.services.mozilla.com/D309694
2026-07-08 06:53:50 +00:00
..