This is done by exposing on CSPInfo the raw array of tt-expressions associated to a CSPInfo::ContentSecurityPolicy [1]. Then we use a static version of nsCSPDirective::ShouldCreateViolationForNewTrustedTypesPolicy that relies on this raw array instead of an actual nsCSPDirective. [1] https://w3c.github.io/trusted-types/dist/spec/#tt-expression Differential Revision: https://phabricator.services.mozilla.com/D242894