Introduce CriteriaHelper#pollUiThreadNested
This change adds an assertion that pollUiThread is not called from the UI thread, which is equivalent to calling sleep(), and won't actually run any UI thread tasks. In the few cases where polling the UI Thread from the UI thread is necessary, I introduce CriteriaHelper#pollUiThreadNested, which nests the looper in order to continue running UI tasks. Bug: 1115220 Change-Id: I834251df334c80d657e45dddeab5ae744de0fe17 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2340004Reviewed-by:Yaron Friedman <yfriedman@chromium.org> Commit-Queue: Michael Thiessen <mthiesse@chromium.org> Cr-Commit-Position: refs/heads/master@{#797436}
Showing
Please register or sign in to comment