commit | 2bc8e92a140aab13d196de140b5b83f0db59a5a2 | [log] [tgz] |
---|---|---|
author | Alex Clarke <alexclarke@chromium.org> | Thu Feb 21 21:39:38 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Feb 21 21:39:38 2019 |
tree | 4db77434c0695698e9533aadc6418edd19828271 | |
parent | 8461280251271c27f017c7d5bfe3de90c71d6389 [diff] |
Refactor ScopedTaskEnvironment::MainThreadHasPendingTask and tests using it Previously this API behaved differently depending on whether mock time was used or not. If mock time was used, it only returned false if there where no pending tasks at all. If mock time wasn't used it returned false if there where no tasks to run now. This is confusing so we replaced it with MainThreadHasPendingTask which checks if there are any tasks to run now. We also fix a problem with ~TestBrowserThreadBundle which was flaking if CHECK(!MainThreadHasPendingTask()) if a delay expired between the last RunUntilIdle() and it. TBR=mfoltz@chromium.org, rouslan@chromium.org, bajones@chromium.org, bnc@chromium.org Bug: 925315 Change-Id: I664615b43882f94126309e1355f5045305bd02c1 Reviewed-on: https://chromium-review.googlesource.com/c/1454363 Commit-Queue: Alex Clarke <alexclarke@chromium.org> Reviewed-by: Alex Clarke <alexclarke@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Bence Béky <bnc@chromium.org> Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org> Reviewed-by: Gabriel Charette <gab@chromium.org> Reviewed-by: Alexander Timin <altimin@chromium.org> Reviewed-by: Sami Kyöstilä <skyostil@chromium.org> Cr-Commit-Position: refs/heads/master@{#634354}
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 .