Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: ios/testing/earl_grey/wait_util.h

Issue 2044433003: Create EarlGrey wait utility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/testing/earl_grey/wait_util.h
diff --git a/ios/testing/earl_grey/wait_util.h b/ios/testing/earl_grey/wait_util.h
index 08e8624bbfc0178a47e81207ba65baa952cfc48c..a670ffecc9c53fb83abac9ae97184d5bb2156ff5 100644
--- a/ios/testing/earl_grey/wait_util.h
+++ b/ios/testing/earl_grey/wait_util.h
@@ -17,6 +17,10 @@ extern const NSTimeInterval kWaitForUIElementTimeout;
// Constant for timeout in seconds while waiting for JavaScript completion.
extern const NSTimeInterval kWaitForJSCompletionTimeout;
-}
+
+// Wait until |condition| is true, or induce GREYAssert after |timeout|.
Eugene But (OOO till 7-30) 2016/06/06 21:38:59 s/Wait/Waits
Eugene But (OOO till 7-30) 2016/06/06 21:38:59 s/induce/induces
baxley 2016/06/06 22:38:07 Done.
baxley 2016/06/06 22:38:07 Done.
+void WaitUntilCondition(NSTimeInterval timeout, bool (^condition)(void));
Eugene But (OOO till 7-30) 2016/06/06 21:38:59 Thank you for placing block as the last argument!
baxley 2016/06/06 22:38:07 :) It wasn't even on accident!
+
+} // namespace testing
#endif // IOS_TESTING_EARL_GREY_WAIT_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698