commit | 54aa1bf75a2a01dcee1eda4682a2490514a962a4 | [log] [tgz] |
---|---|---|
author | Antonio Gomes <tonikitoo@igalia.com> | Fri Jul 13 15:47:03 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jul 13 15:47:03 2018 |
tree | 9d977cb355ffdf26a6dcbb64591a85d54db9d6aa | |
parent | 043b97cee41154a32d6c1cd8965075813a9ba672 [diff] |
Add a TestURLLoaderFactory::SimulateResponseForPendingRequest variant that takes a PendingRequest It turns out that in order to migrate some specific unit tests more smoothly from URLFetcher to SimpleURLLoader, it is useful to have a method where indexing of the pending requests list is preserved after a given pending request is handled. For instance some tests do this: request_load_1(); request_load_2(); request_load_3(); (..) request_load_n(); response_request_3(); response_request_2(); response_request_n(); (..) response_request_1(); // do stuff request_load_n+1() request_load_n+2() request_load_n+3() response_request_n+2() response_request_n+3() response_request_n+1() In the above scenario, it is handy to be able to simulate responses at the original order requests were made. This CL adds an API that fills this gap. In practice, this is a preparation for https://crrev.com/c/1114998/. BUG=773295 Cq-Include-Trybots: luci.chromium.try:linux_mojo Change-Id: Id9059f3d8f091eabfb21948f074599c180f44128 Reviewed-on: https://chromium-review.googlesource.com/1123236 Commit-Queue: Antonio Gomes <tonikitoo@igalia.com> Reviewed-by: Maks Orlovich <morlovich@chromium.org> Cr-Commit-Position: refs/heads/master@{#574927}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .