There is a wait util in base/test/ios that DCHECKS on timeout.
There is a wait util in ios/testing/earl_grey that issues a GREYAssertion on timeout.
The second is useful for EarlGrey tests. However, some test code that is independent of EarlGrey (test helpers that are framework-agnostic). These helpers need to implement their own code to wait.
It would be cleaner if the logic in ios/testing/earl_grey to spin until success or timeout, moved to a generic helper that returned boolean. There could be an earl_grey helper that calls this and issues a GREYAssert (or the callsite could just do this).
Comment 1 by baxley@chromium.org
, Oct 24 2016