commit | d9e4cb77324a3d4e0dfd6b599ce34e1224fdedb6 | [log] [tgz] |
---|---|---|
author | Wez <[email protected]> | Wed Jan 09 03:07:03 2019 |
committer | Commit Bot <[email protected]> | Wed Jan 09 03:07:03 2019 |
tree | 45847d613b7866bda7dcbf944bda283331ad805f | |
parent | 4eb3b6e49aa880be6e71504a56719a778be26e82 [diff] |
Apply a default timeout to RunLoop::Run() calls on test main threads. Sheriffs: This change is intended to expose tests which Run() for an excessive amount of time. Please consider disabling tests which hit the new Run() timeouts, rather than reverting this CL. We add RunLoop::ScopedRunTimeoutForTest, which configures the calling thread with a timeout, and optional callback, to apply to all Run() calls made while it is in-scope. If a Run() is not Quit() by the caller within the specified timeout then the loop is implicitly quit, and the optional callback is run, if provided. ScopedTaskEnvironment now applies a default ScopedRunTimeoutForTest set to invoke LOG(FATAL) if any Run() on the test's main thread runs for more than TestTimeouts::action_max_timeout(). Bug: 918724 Change-Id: I080b78e193202da0c9e3deee3a201ef1619cfd37 Reviewed-on: https://chromium-review.googlesource.com/c/1319344 Commit-Queue: Wez <[email protected]> Reviewed-by: Albert J. Wong <[email protected]> Reviewed-by: Gabriel Charette <[email protected]> Cr-Commit-Position: refs/heads/master@{#621022}
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 .