Cleanup HostResolver timeout/retry tests.
Instead of relying on sleeping and the actual clock, use a mock taskrunner to simulate the passage of time. Makes the test more accurate and stable, and it also speeds things up significantly (~1.5s->60-70ms). Also convert ProcTask to use unique_ptr and WeakPtrs instead of ref counting to more cleanly cleanup the memory on completion instead of waiting for unused scheduled retries. Change-Id: I22b741d8b29d8eb419d125147ef98eba01c658e4 Reviewed-on: https://chromium-review.googlesource.com/1108078Reviewed-by:Ilya Sherman <isherman@chromium.org> Reviewed-by:
Helen Li <xunjieli@chromium.org> Commit-Queue: Eric Orth <ericorth@chromium.org> Cr-Commit-Position: refs/heads/master@{#570840}
Showing
This diff is collapsed.
Please register or sign in to comment