Chromium Code Reviews| Index: ios/web/shell/test/earl_grey/shell_matchers.mm |
| diff --git a/ios/web/shell/test/earl_grey/shell_matchers.mm b/ios/web/shell/test/earl_grey/shell_matchers.mm |
| index 6763f9ca8235ab10213d3d200ab2ff6769d579e2..d490a5ba0d51af1c23e50faa8ec4f332b0fe0a46 100644 |
| --- a/ios/web/shell/test/earl_grey/shell_matchers.mm |
| +++ b/ios/web/shell/test/earl_grey/shell_matchers.mm |
| @@ -54,16 +54,10 @@ id<GREYMatcher> addressField() { |
| return NO; |
| } |
| UITextField* textField = base::mac::ObjCCastStrict<UITextField>(view); |
| - NSDate* deadline = |
| - [NSDate dateWithTimeIntervalSinceNow:testing::kWaitForUIElementTimeout]; |
| - while ([[NSDate date] compare:deadline] != NSOrderedDescending) { |
| - if ([textField.text isEqualToString:base::SysUTF8ToNSString(text)]) { |
| - return YES; |
| - } |
| - base::test::ios::SpinRunLoopWithMaxDelay( |
| - base::TimeDelta::FromSecondsD(testing::kSpinDelaySeconds)); |
| - } |
| - return NO; |
| + testing::WaitUntilCondition(testing::kWaitForUIElementTimeout, ^() { |
|
Eugene But (OOO till 7-30)
2016/06/06 21:38:59
I don't think this will compile on 32-bit platform
baxley
2016/06/06 22:38:08
Nice catch! Done.
|
| + return [textField.text isEqualToString:base::SysUTF8ToNSString(text)]; |
| + }); |
| + return YES; |
| }; |
| DescribeToBlock describe = ^(id<GREYDescription> description) { |