Index: ios/testing/wait_util.h |
diff --git a/ios/testing/earl_grey/wait_util.h b/ios/testing/wait_util.h |
similarity index 56% |
copy from ios/testing/earl_grey/wait_util.h |
copy to ios/testing/wait_util.h |
index 33df9252ec54271c8ab1230833b40dd5d0d658a3..1e8b526e5e977b075c89e87b14827519058078d6 100644 |
--- a/ios/testing/earl_grey/wait_util.h |
+++ b/ios/testing/wait_util.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef IOS_TESTING_EARL_GREY_WAIT_UTIL_H_ |
-#define IOS_TESTING_EARL_GREY_WAIT_UTIL_H_ |
+#ifndef IOS_TESTING_WAIT_UTIL_H_ |
+#define IOS_TESTING_WAIT_UTIL_H_ |
Eugene But (OOO till 7-30)
2016/10/25 14:43:38
This is now third wait_util file. And WaitUntilCon
baxley
2016/10/25 18:50:04
I have a bug to delete the one in ios/testing/earl
|
#import <Foundation/Foundation.h> |
@@ -21,15 +21,11 @@ extern const NSTimeInterval kWaitForJSCompletionTimeout; |
// Constant for timeout in seconds while waiting for a download to complete. |
extern const NSTimeInterval kWaitForDownloadTimeout; |
-// Waits until |condition| is true, or induces GREYAssert after |timeout|. |
-void WaitUntilCondition(NSTimeInterval timeout, bool (^condition)(void)); |
- |
-// Waits until |condition| is true, or induces GREYAssert after |timeout| with |
-// |timeoutDescription| error message. |
-void WaitUntilCondition(NSTimeInterval timeout, |
- NSString* timeoutDescription, |
- bool (^condition)(void)); |
+// Returns true when condition() becomes true, otherwise returns false after |
+// |timeout|. |
+bool WaitUntilConditionOrTimeout(NSTimeInterval timeout, |
Eugene But (OOO till 7-30)
2016/10/25 14:43:38
Should we use Chromium types instead (base::TimeDe
baxley
2016/10/25 18:50:04
This adds complexity, since the caller has to crea
|
+ bool (^condition)(void)); |
Eugene But (OOO till 7-30)
2016/10/25 14:43:38
Should this be ConditionBlock from block_types.h?
baxley
2016/10/25 18:50:04
Done.
|
} // namespace testing |
-#endif // IOS_TESTING_EARL_GREY_WAIT_UTIL_H_ |
+#endif // IOS_TESTING_WAIT_UTIL_H_ |