Commit 8d43ee37 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Add wait for testSignInSwitchAccountsAndKeepDataSeparate.

Bug: 989618
Change-Id: Ie826531bc0e891bcea5524cdecdc662692d0e2de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1732350
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Auto-Submit: Justin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarJérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683868}
parent 824b2223
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#import <EarlGrey/EarlGrey.h> #import <EarlGrey/EarlGrey.h>
#import "base/test/ios/wait_util.h"
#import "ios/chrome/browser/ui/authentication/signin_earlgrey_utils_app_interface.h" #import "ios/chrome/browser/ui/authentication/signin_earlgrey_utils_app_interface.h"
#import "ios/public/provider/chrome/browser/signin/fake_chrome_identity.h" #import "ios/public/provider/chrome/browser/signin/fake_chrome_identity.h"
...@@ -45,6 +46,14 @@ GREY_STUB_CLASS_IN_APP_MAIN_QUEUE(SigninEarlGreyUtilsAppInterface) ...@@ -45,6 +46,14 @@ GREY_STUB_CLASS_IN_APP_MAIN_QUEUE(SigninEarlGreyUtilsAppInterface)
// Required to avoid any problem since the following test is not dependant // Required to avoid any problem since the following test is not dependant
// to UI, and the previous action has to be totally finished before going // to UI, and the previous action has to be totally finished before going
// through the assert. // through the assert.
GREYAssert(base::test::ios::WaitUntilConditionOrTimeout(
base::test::ios::kWaitForActionTimeout,
^bool {
NSString* primaryAccountGaiaID =
[SignInEarlGreyUtilsAppInterface primaryAccountGaiaID];
return primaryAccountGaiaID.length > 0;
}),
@"Sign in did not complete.");
[[GREYUIThreadExecutor sharedInstance] drainUntilIdle]; [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
NSString* primaryAccountGaiaID = NSString* primaryAccountGaiaID =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment