Name Description Size
moz.build 699
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. 45293
TestFilenameEvalParser.cpp 16399
TestSecureContext.cpp 4077
TestSmartCrashTrimmer.cpp 1478
TestUnexpectedPrivilegedLoads.cpp some css here 12882