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

Side by Side Diff: ios/testing/earl_grey/wait_util.h

Issue 2252723008: Add a custom error message in EG WaitUtil (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@taplink
Patch Set: Rebase Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | ios/testing/earl_grey/wait_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_TESTING_EARL_GREY_WAIT_UTIL_H_ 5 #ifndef IOS_TESTING_EARL_GREY_WAIT_UTIL_H_
6 #define IOS_TESTING_EARL_GREY_WAIT_UTIL_H_ 6 #define IOS_TESTING_EARL_GREY_WAIT_UTIL_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 namespace testing { 10 namespace testing {
11 11
12 // Constant for UI wait loop in seconds. 12 // Constant for UI wait loop in seconds.
13 extern const NSTimeInterval kSpinDelaySeconds; 13 extern const NSTimeInterval kSpinDelaySeconds;
14 14
15 // Constant for timeout in seconds while waiting for UI element. 15 // Constant for timeout in seconds while waiting for UI element.
16 extern const NSTimeInterval kWaitForUIElementTimeout; 16 extern const NSTimeInterval kWaitForUIElementTimeout;
17 17
18 // Constant for timeout in seconds while waiting for JavaScript completion. 18 // Constant for timeout in seconds while waiting for JavaScript completion.
19 extern const NSTimeInterval kWaitForJSCompletionTimeout; 19 extern const NSTimeInterval kWaitForJSCompletionTimeout;
20 20
21 // Waits until |condition| is true, or induces GREYAssert after |timeout|. 21 // Waits until |condition| is true, or induces GREYAssert after |timeout|.
22 void WaitUntilCondition(NSTimeInterval timeout, bool (^condition)(void)); 22 void WaitUntilCondition(NSTimeInterval timeout, bool (^condition)(void));
23 23
24 // Waits until |condition| is true, or induces GREYAssert after |timeout| with
25 // |timeoutDescription| error message.
26 void WaitUntilCondition(NSTimeInterval timeout,
27 NSString* timeoutDescription,
28 bool (^condition)(void));
29
24 } // namespace testing 30 } // namespace testing
25 31
26 #endif // IOS_TESTING_EARL_GREY_WAIT_UTIL_H_ 32 #endif // IOS_TESTING_EARL_GREY_WAIT_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | ios/testing/earl_grey/wait_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698