Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 BASE_TEST_IOS_WAIT_UTIL_H_ | 5 #ifndef BASE_TEST_IOS_WAIT_UTIL_H_ |
| 6 #define BASE_TEST_IOS_WAIT_UTIL_H_ | 6 #define BASE_TEST_IOS_WAIT_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/ios/block_types.h" | 8 #include "base/ios/block_types.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 | 32 |
| 33 // Waits until |condition| is met. A |message_loop| to spin and a |timeout| can | 33 // Waits until |condition| is met. A |message_loop| to spin and a |timeout| can |
| 34 // be optionally passed; if |timeout| is zero, a reasonable default will be | 34 // be optionally passed; if |timeout| is zero, a reasonable default will be |
| 35 // used. | 35 // used. |
| 36 void WaitUntilCondition(ConditionBlock condition, | 36 void WaitUntilCondition(ConditionBlock condition, |
| 37 MessageLoop* message_loop, | 37 MessageLoop* message_loop, |
| 38 TimeDelta timeout); | 38 TimeDelta timeout); |
| 39 void WaitUntilCondition(ConditionBlock condition); | 39 void WaitUntilCondition(ConditionBlock condition); |
| 40 | 40 |
| 41 // Lets the run loop of the current thread process other messages | 41 // Lets the run loop of the current thread process other messages |
| 42 // within the given maximum delay. | 42 // within the given maximum delay. This method may return before max_delay |
| 43 // elapsed. | |
| 43 void SpinRunLoopWithMaxDelay(TimeDelta max_delay); | 44 void SpinRunLoopWithMaxDelay(TimeDelta max_delay); |
| 44 | 45 |
| 46 // Lets the run loop of the current thread process other messages | |
| 47 // within the given minimum delay. This method returns after max_delay elapsed. | |
|
rohitrao (ping after 24h)
2016/08/02 15:52:37
What is "max_delay" in this context? Should that
Eugene But (OOO till 7-30)
2016/08/02 15:57:28
Yes, this should be |min_delay|. Thanks for catchi
| |
| 48 void SpinRunLoopWithMinDelay(TimeDelta min_delay); | |
| 49 | |
| 45 } // namespace ios | 50 } // namespace ios |
| 46 } // namespace test | 51 } // namespace test |
| 47 } // namespace base | 52 } // namespace base |
| 48 | 53 |
| 49 #endif // BASE_TEST_IOS_WAIT_UTIL_H_ | 54 #endif // BASE_TEST_IOS_WAIT_UTIL_H_ |
| OLD | NEW |