[test] Provide RunLoop::RunUntilConditionForTest() helper.
Some tests need to run the message loop until a particular condition becomes true, but have no direct signal from the code under test to use to trigger the check & terminate the run. RunUntilConditionForTest() runs the loop and repeatedly calls a supplied callback until it returns true, or the Run()-timeout expires. The helper returns true if the condition was met before the timeout. Bug: 1021777, 976740 Change-Id: I18f887431a68cb73cc77a445f3b915284b111cb4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033162 Commit-Queue: Wez <wez@chromium.org> Auto-Submit: Wez <wez@chromium.org> Reviewed-by:Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#738222}
Showing
Please register or sign in to comment