-
Istiaque Ahmed authored
This CL makes ContentVerifier::ShouldVerifyAnyPaths take canonical relative paths instead of unix style relative paths, so that it can take OS specific canonicalization into account. This affects all paths specified in manifest.json: background JS, background html, content script, locales, etc. Previously ShouldVerifyAnyPaths would have returned false for case variants of those resources on win/mac, and content-verification wouldn't run for them as there wouldn't be any ContentVerifyJobs for them. An example of this is on win/mac, a script specified as script.js in manifest.json, but accessed as Script.js on win/mac will now be verified with this CL. The same applies to _locales, locale path accessed in different case now would correctly skip verification (e.g. en_gb instead of en_GB), instead of incorrectly causing content verification failure. ContentVerifierObserver now exposes did_hash_mismatch, which would be slightly better to observe CVDelegate::VerifyFailed from tests. This CL adds unittests for the change in content_verifier_unittest.cc This CL also adds a real world like unittest under //chrome, so the browser image paths and other manifest paths are verified (and not mocked like content_verifier_unittest) end-to-end. This is chrome_content_verifier_unittest.cc BUG=1051401,796395 Change-Id: I74161a043a6e65b80c7bf06c249cf42813f867a9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2049125 Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org> Reviewed-by:
Oleg Davydov <burunduk@chromium.org> Cr-Commit-Position: refs/heads/master@{#744824}
0f709d22