fix($parse): correctly detect CSP mode via $sniffer

Also fixes the test suite, which was not actually taking CSP-mode paths when
we were expecting it to.

Numerous CSP-mode tests are failing, working on fixing these.
fix the test suite to use the CSP path when testing CSP mode