Name Description Size Coverage
moz.build 745 -
TestCSPParser.cpp Testing the parser is non trivial, especially since we can not call parser functionality directly in compiled code tests. All the tests (except the fuzzy tests at the end) follow the same schemata: a) create an nsIContentSecurityPolicy object b) set the selfURI in SetRequestContextWithPrincipal c) append one or more policies by calling AppendPolicy d) check if the policy count is correct by calling GetPolicyCount e) compare the result of the policy with the expected output using the struct PolicyTest; In general we test: a) policies that the parser should accept b) policies that the parser should reject c) policies that are randomly generated (fuzzy tests) Please note that fuzzy tests are *DISABLED* by default and shold only be run *OFFLINE* whenever code in nsCSPParser changes. To run fuzzy tests, flip RUN_OFFLINE_TESTS to 1. 46418 92 %
TestFilenameEvalParser.cpp 18660 97 %
TestIntegrityPolicy.cpp 3494 100 %
TestPolicyContainer.cpp 3919 100 %
TestSecureContext.cpp 3914 98 %
TestSmartCrashTrimmer.cpp 1336 100 %
TestUnexpectedPrivilegedLoads.cpp some css here 13074 79 %
TestWAICTHeaderParsing.cpp 8591 100 %
TestWAICTManifestValidation.cpp DELIMITER 17288 100 %