Stop relying on disabled web security in CORB tests.
This CL: 1. Transitions core CORB test coverage away from the fetch API (where blocking by OOR-CORS can interfere with test results) to triggering fetches via <img> tags (where CORB stays applicable even after OOR-CORS ships). Tests covering CORS/CORB intersection continue to be done via fetch API (in CrossSiteDocumentBlockingTest.BlockFetches test). Verification of response body no longer depends on disabled web security (and inspecting fetch API results), but is instead done via RequestInterceptor helper that lives next to the tests. The CL also uncovered and fixes a threading issue in the implementation of RequestInterceptor. 2. Stops testing range requests in content_browsertests and starts to rely on existing and new test coverage in content_unittests (fetch API seems to be the only directly-test-controllable way of making range requests). I've tested this CL by manually running CrossSiteDocumentBlockingTest from content_browsertests 1) in default mode, 2) with NetworkService enabled and 3) with NetworkService and OutOfBlinkCORS enabled. Bug: 870173 Cq-Include-Trybots: luci.chromium.try:linux_mojo Change-Id: Iec5c9f0e7ddad0ff02627b88dcfab276795e7be9 Reviewed-on: https://chromium-review.googlesource.com/c/1279351Reviewed-by:Takashi Toyoshima <toyoshim@chromium.org> Reviewed-by:
Yutaka Hirano <yhirano@chromium.org> Reviewed-by:
Charlie Reis <creis@chromium.org> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Cr-Commit-Position: refs/heads/master@{#601174}
Showing
This diff is collapsed.
Please register or sign in to comment