Allow TestURLLoaderFactory::SimulateResponse's mock responses to fail
This CL makes the TestURLLoaderFactory::SimulateResponse API more flexible in the following ways: - it starts to actually use the |net_error| parameter (to build the URLLoaderCompletionatus instance) - it adds an extra (also optional) net::HttpStatusCode parameter, so that one can more easily mock failing responses. - one can see it in action in [1]. [1] https://crrev.com/c/1114998/components/autofill/core/browser/autofill_download_manager_unittest.cc#283 Bug: 773295 Cq-Include-Trybots: luci.chromium.try:linux_mojo Change-Id: Iba4edf640b3ff82e035ffbe26c3066d404f18ce7 Reviewed-on: https://chromium-review.googlesource.com/1120916 Commit-Queue: Antonio Gomes <tonikitoo@igalia.com> Reviewed-by:Antonio Gomes <tonikitoo@igalia.com> Reviewed-by:
Matt Menke <mmenke@chromium.org> Cr-Commit-Position: refs/heads/master@{#571635}
Showing
Please register or sign in to comment