commit | 5e2df665dfce3a3aceb4852d90ad55d31fc36f20 | [log] [tgz] |
---|---|---|
author | Gabriel Charette <gab@chromium.org> | Tue Nov 21 23:19:34 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Nov 21 23:19:34 2017 |
tree | 8c91dc485130128b90c3f6480c8a968146a177f6 | |
parent | 78294a3bf9a25aa0c05a5327b4c0a8f7325e47d9 [diff] |
Add MOCK_TIME mode to ScopedTaskEnvironment :) Taking advantage of the new kBoundToThread mode on TestMockTimeTaskRunner. This change also required tweaking the ScopedTaskEnvironment::RunUntilIdle() logic as RunLoop().Run() on TestMockTimeTaskRunner results in advancing time when there's no request to quit-when-idle which is undesired here. New logic gets rid of need for |on_queue_empty_closure_| and I think is simpler overall. As of patch set 20, this new RunUntilIdle() logic also avoids using TaskScheduler::FlushForTesting() as that can result in hangs should a TaskScheduler task synchronously block on the main thread. R=fdoray@chromium.org TBR=gab@chromium.org (IWYU fixes) Bug: 708584 Change-Id: I76ba55ec64d398151420379d3fcdcd5186fbceb8 Reviewed-on: https://chromium-review.googlesource.com/638550 Commit-Queue: Gabriel Charette <gab@chromium.org> Reviewed-by: Gabriel Charette <gab@chromium.org> Reviewed-by: Kyle Horimoto <khorimoto@chromium.org> Reviewed-by: François Doray <fdoray@chromium.org> Cr-Commit-Position: refs/heads/master@{#518433}
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 .