Commit aff14e91 authored by Sergio Collazos's avatar Sergio Collazos Committed by Commit Bot

Revert "[iOS] Add a new option to non-managed account Sign-Out."

This reverts commit 75044a52.

Reason for revert: After this CL Landed in 7603:
https://ci.chromium.org/p/chrome/builders/ci/iphone-simulator/7603?blamelist=1#blamelist-tab

All subsequent runs of iphone-simulator ui_eg2tests have failed:
https://ci.chromium.org/p/chrome/builders/ci/iphone-simulator

I tried repro locally but other than some DCHECKs I could make the test
fail, but after I ran this revert using twosided.py the ui_eg2tests
were completed successfully:
https://ci.chromium.org/p/chrome/builders/try/iphone-simulator/229


Original change's description:
> [iOS] Add a new option to non-managed account Sign-Out.
>
> Adds a new option for users in non-managed accounts to clear synced
> data from their local device when signing out.
>
> Bug: 1005509
> Change-Id: Iae3b599b3ca3698b2a176bd56b470c6787c74367
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007695
> Commit-Queue: Nohemi Fernandez <fernandex@chromium.org>
> Reviewed-by: Jérôme Lebel <jlebel@chromium.org>
> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#734681}

TBR=sdefresne@chromium.org,jlebel@chromium.org,fernandex@chromium.org

Change-Id: I0d0742663b7b27cfefde24380b3a2c331aafb4e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1005509
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2020323
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735120}
parent c076c9b9
...@@ -662,9 +662,6 @@ locale. The strings in this file are specific to iOS. ...@@ -662,9 +662,6 @@ locale. The strings in this file are specific to iOS.
<message name="IDS_IOS_DISCONNECT_DIALOG_CONTINUE_BUTTON_MOBILE" desc="The title of the continue button on the disconnect dialog [Length: 20em]."> <message name="IDS_IOS_DISCONNECT_DIALOG_CONTINUE_BUTTON_MOBILE" desc="The title of the continue button on the disconnect dialog [Length: 20em].">
Sign Out Sign Out
</message> </message>
<message name="IDS_IOS_DISCONNECT_DIALOG_CONTINUE_AND_CLEAR_MOBILE" desc="The title of the continue and clear browsing data button on the disconnect dialog [iOS only].">
Sign Out and Clear Synced Data
</message>
<message name="IDS_IOS_DISCONNECT_DIALOG_INFO_MOBILE" desc="The information text on the disconnect dialog [Length: 400em]."> <message name="IDS_IOS_DISCONNECT_DIALOG_INFO_MOBILE" desc="The information text on the disconnect dialog [Length: 400em].">
Changes to your bookmarks, history, passwords, and other settings will no longer be synced to your Google Account. However, your existing data will remain stored in your Google Account. Changes to your bookmarks, history, passwords, and other settings will no longer be synced to your Google Account. However, your existing data will remain stored in your Google Account.
</message> </message>
......
...@@ -11,12 +11,6 @@ ...@@ -11,12 +11,6 @@
@class FakeChromeIdentity; @class FakeChromeIdentity;
typedef NS_ENUM(NSInteger, SignOutConfirmation) {
SignOutConfirmationManagedUser,
SignOutConfirmationNonManagedUser,
SignOutConfirmationNonManagedUserWithClearedData,
};
// Methods used for the EarlGrey tests, related to UI. // Methods used for the EarlGrey tests, related to UI.
@interface SigninEarlGreyUI : NSObject @interface SigninEarlGreyUI : NSObject
...@@ -63,9 +57,9 @@ typedef NS_ENUM(NSInteger, SignOutConfirmation) { ...@@ -63,9 +57,9 @@ typedef NS_ENUM(NSInteger, SignOutConfirmation) {
// Checks that the sign-in promo view is not visible. // Checks that the sign-in promo view is not visible.
+ (void)checkSigninPromoNotVisible; + (void)checkSigninPromoNotVisible;
// Taps the appropriate action label on the sign-out dialog for the given // Signs out from the current identity. if |isManagedAccount| is true, the
// |signOutConfirmation| profile and signs out from the current identity. // confirmed managed dialog is confirmed while signing out.
+ (void)signOutWithSignOutConfirmation:(SignOutConfirmation)signOutConfirmation; + (void)signOutWithManagedAccount:(BOOL)isManagedAccount;
@end @end
......
...@@ -189,31 +189,16 @@ using chrome_test_util::UnifiedConsentAddAccountButton; ...@@ -189,31 +189,16 @@ using chrome_test_util::UnifiedConsentAddAccountButton;
assertWithMatcher:grey_nil()]; assertWithMatcher:grey_nil()];
} }
+ (void)signOutWithSignOutConfirmation: + (void)signOutWithManagedAccount:(BOOL)isManagedAccount {
(SignOutConfirmation)signOutConfirmation {
[ChromeEarlGreyUI openSettingsMenu]; [ChromeEarlGreyUI openSettingsMenu];
[ChromeEarlGreyUI tapSettingsMenuButton:SettingsAccountButton()]; [ChromeEarlGreyUI tapSettingsMenuButton:SettingsAccountButton()];
[ChromeEarlGreyUI tapAccountsMenuButton:SignOutAccountsButton()]; [ChromeEarlGreyUI tapAccountsMenuButton:SignOutAccountsButton()];
int confirmationLabelID = 0; int confirmationLabelID = 0;
switch (signOutConfirmation) { if (isManagedAccount) {
case SignOutConfirmationManagedUser: { confirmationLabelID = IDS_IOS_MANAGED_DISCONNECT_DIALOG_ACCEPT_UNITY;
confirmationLabelID = IDS_IOS_MANAGED_DISCONNECT_DIALOG_ACCEPT_UNITY; } else {
break; confirmationLabelID = IDS_IOS_DISCONNECT_DIALOG_CONTINUE_BUTTON_MOBILE;
}
case SignOutConfirmationNonManagedUser: {
confirmationLabelID = IDS_IOS_DISCONNECT_DIALOG_CONTINUE_BUTTON_MOBILE;
break;
}
case SignOutConfirmationNonManagedUserWithClearedData: {
confirmationLabelID = IDS_IOS_DISCONNECT_DIALOG_CONTINUE_AND_CLEAR_MOBILE;
break;
}
default: {
NOTREACHED();
break;
}
} }
id<GREYMatcher> confirmationButtonMatcher = [ChromeMatchersAppInterface id<GREYMatcher> confirmationButtonMatcher = [ChromeMatchersAppInterface
buttonWithAccessibilityLabelID:confirmationLabelID]; buttonWithAccessibilityLabelID:confirmationLabelID];
[[EarlGrey selectElementWithMatcher:confirmationButtonMatcher] [[EarlGrey selectElementWithMatcher:confirmationButtonMatcher]
......
...@@ -111,9 +111,7 @@ source_set("eg_tests") { ...@@ -111,9 +111,7 @@ source_set("eg_tests") {
":test_support", ":test_support",
"//ios/chrome/app/strings", "//ios/chrome/app/strings",
"//ios/chrome/browser/tabs", "//ios/chrome/browser/tabs",
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/authentication:eg_test_support", "//ios/chrome/browser/ui/authentication:eg_test_support",
"//ios/chrome/browser/ui/bookmarks:eg_test_support",
"//ios/chrome/test/app:test_support", "//ios/chrome/test/app:test_support",
"//ios/chrome/test/earl_grey:test_support", "//ios/chrome/test/earl_grey:test_support",
"//ios/public/provider/chrome/browser/signin:fake_chrome_identity", "//ios/public/provider/chrome/browser/signin:fake_chrome_identity",
...@@ -182,9 +180,7 @@ source_set("eg2_tests") { ...@@ -182,9 +180,7 @@ source_set("eg2_tests") {
":eg_test_support+eg2", ":eg_test_support+eg2",
"//base", "//base",
"//ios/chrome/app/strings", "//ios/chrome/app/strings",
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/authentication:eg_test_support+eg2", "//ios/chrome/browser/ui/authentication:eg_test_support+eg2",
"//ios/chrome/browser/ui/bookmarks:eg_test_support+eg2",
"//ios/chrome/browser/ui/settings/google_services:constants", "//ios/chrome/browser/ui/settings/google_services:constants",
"//ios/chrome/test/earl_grey:eg_test_support+eg2", "//ios/chrome/test/earl_grey:eg_test_support+eg2",
"//ios/public/provider/chrome/browser/signin:fake_chrome_identity", "//ios/public/provider/chrome/browser/signin:fake_chrome_identity",
......
...@@ -4,19 +4,11 @@ ...@@ -4,19 +4,11 @@
#import "ios/chrome/browser/ui/authentication/signin_earl_grey_ui.h" #import "ios/chrome/browser/ui/authentication/signin_earl_grey_ui.h"
#import "ios/chrome/browser/ui/authentication/signin_earlgrey_utils.h" #import "ios/chrome/browser/ui/authentication/signin_earlgrey_utils.h"
#import "ios/chrome/browser/ui/authentication/signin_earlgrey_utils_app_interface.h"
#import "ios/chrome/browser/ui/bookmarks/bookmark_earl_grey.h"
#import "ios/chrome/browser/ui/bookmarks/bookmark_earl_grey_ui.h"
#import "ios/chrome/browser/ui/ui_feature_flags.h"
#import "ios/chrome/grit/ios_strings.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h"
#import "ios/public/provider/chrome/browser/signin/fake_chrome_identity.h" #import "ios/public/provider/chrome/browser/signin/fake_chrome_identity.h"
#import "ios/testing/earl_grey/app_launch_manager.h"
#import "ios/testing/earl_grey/earl_grey_test.h" #import "ios/testing/earl_grey/earl_grey_test.h"
#include "ui/base/l10n/l10n_util.h"
#if !defined(__has_feature) || !__has_feature(objc_arc) #if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support." #error "This file requires ARC support."
...@@ -30,18 +22,11 @@ using chrome_test_util::PrimarySignInButton; ...@@ -30,18 +22,11 @@ using chrome_test_util::PrimarySignInButton;
namespace { namespace {
// Constant for timeout while waiting for asynchronous sync operations.
const NSTimeInterval kSyncOperationTimeout = 10.0;
// Returns a matcher for a button that matches the userEmail in the given // Returns a matcher for a button that matches the userEmail in the given
// |fakeIdentity|. // |fakeIdentity|.
id<GREYMatcher> ButtonWithFakeIdentity(FakeChromeIdentity* fakeIdentity) { id<GREYMatcher> ButtonWithFakeIdentity(FakeChromeIdentity* fakeIdentity) {
return ButtonWithAccessibilityLabel(fakeIdentity.userEmail); return ButtonWithAccessibilityLabel(fakeIdentity.userEmail);
} }
id<GREYMatcher> NoBookmarksLabel() {
return grey_text(l10n_util::GetNSString(IDS_IOS_BOOKMARK_NO_BOOKMARKS_LABEL));
}
} }
// Integration tests using the Account Settings screen. // Integration tests using the Account Settings screen.
...@@ -50,25 +35,6 @@ id<GREYMatcher> NoBookmarksLabel() { ...@@ -50,25 +35,6 @@ id<GREYMatcher> NoBookmarksLabel() {
@implementation AccountCollectionsTestCase @implementation AccountCollectionsTestCase
- (void)tearDown {
[ChromeEarlGrey waitForBookmarksToFinishLoading];
[ChromeEarlGrey clearBookmarks];
[BookmarkEarlGrey clearBookmarksPositionCache];
[ChromeEarlGrey clearSyncServerData];
[super tearDown];
}
- (void)setUp {
[super setUp];
[ChromeEarlGrey waitForBookmarksToFinishLoading];
[ChromeEarlGrey clearBookmarks];
GREYAssertEqual(
[ChromeEarlGrey numberOfSyncEntitiesWithType:syncer::BOOKMARKS], 0,
@"No bookmarks should exist before tests start.");
}
// Tests that the Sync and Account Settings screen are correctly popped if the // Tests that the Sync and Account Settings screen are correctly popped if the
// signed in account is removed. // signed in account is removed.
- (void)testSignInPopUpAccountOnSyncSettings { - (void)testSignInPopUpAccountOnSyncSettings {
...@@ -172,74 +138,6 @@ id<GREYMatcher> NoBookmarksLabel() { ...@@ -172,74 +138,6 @@ id<GREYMatcher> NoBookmarksLabel() {
performAction:grey_tap()]; performAction:grey_tap()];
} }
// Tests that selecting sign-out from a non-managed account keeps the user's
// synced data.
- (void)testSignOutFromNonManagedAccountKeepsData {
// Earl Grey 1 does not enable experimental flags.
#if defined(CHROME_EARL_GREY_1)
EARL_GREY_TEST_SKIPPED(@"Test skipped on Earl Grey 1.");
#endif
[[AppLaunchManager sharedManager]
ensureAppLaunchedWithFeaturesEnabled:{kClearSyncedData}
disabled:{}
relaunchPolicy:NoForceRelaunchAndResetState];
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyUtils fakeIdentity1];
// Sign In |fakeIdentity|.
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
// Add a bookmark after sync is initialized.
[ChromeEarlGrey waitForSyncInitialized:YES syncTimeout:kSyncOperationTimeout];
[ChromeEarlGrey waitForBookmarksToFinishLoading];
[SigninEarlGreyUtilsAppInterface addBookmark:@"youtube.com"
withTitle:@"cats"];
[SigninEarlGreyUI
signOutWithSignOutConfirmation:SignOutConfirmationNonManagedUser];
// Open the Bookmarks screen on the Tools menu.
[BookmarkEarlGreyUI openBookmarks];
[BookmarkEarlGreyUI openMobileBookmarks];
// Assert that the 'cats' bookmark is displayed.
[[EarlGrey selectElementWithMatcher:ButtonWithAccessibilityLabel(@"cats")]
assertWithMatcher:grey_notNil()];
}
// Tests that selecting sign-out and clear data from a non-managed user account
// clears the user's synced data.
- (void)testSignOutAndClearDataFromNonManagedAccountClearsData {
// Earl Grey 1 does not enable experimental flags.
#if defined(CHROME_EARL_GREY_1)
EARL_GREY_TEST_SKIPPED(@"Test skipped on Earl Grey 1.");
#endif
[[AppLaunchManager sharedManager]
ensureAppLaunchedWithFeaturesEnabled:{kClearSyncedData}
disabled:{}
relaunchPolicy:NoForceRelaunchAndResetState];
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyUtils fakeIdentity1];
// Sign In |fakeIdentity|.
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
// Add a bookmark after sync is initialized.
[ChromeEarlGrey waitForSyncInitialized:YES syncTimeout:kSyncOperationTimeout];
[ChromeEarlGrey waitForBookmarksToFinishLoading];
[SigninEarlGreyUtilsAppInterface addBookmark:@"youtube.com"
withTitle:@"cats"];
[SigninEarlGreyUI signOutWithSignOutConfirmation:
SignOutConfirmationNonManagedUserWithClearedData];
// Open the Bookmarks screen on the Tools menu.
[BookmarkEarlGreyUI openBookmarks];
[BookmarkEarlGreyUI openMobileBookmarks];
// Assert that there are no bookmarks.
[[EarlGrey selectElementWithMatcher:NoBookmarksLabel()]
assertWithMatcher:grey_notNil()];
}
// Tests that the user isn't signed out and the UI is correct when the // Tests that the user isn't signed out and the UI is correct when the
// disconnect is cancelled in the Account Settings screen. // disconnect is cancelled in the Account Settings screen.
- (void)testSignInDisconnectCancelled { - (void)testSignInDisconnectCancelled {
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#import "ios/chrome/browser/ui/settings/google_services/accounts_table_view_controller.h" #import "ios/chrome/browser/ui/settings/google_services/accounts_table_view_controller.h"
#import "base/mac/foundation_util.h" #import "base/mac/foundation_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/user_metrics.h" #include "base/metrics/user_metrics.h"
#include "base/strings/sys_string_conversions.h" #include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
...@@ -348,11 +347,11 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -348,11 +347,11 @@ typedef NS_ENUM(NSInteger, ItemType) {
return; return;
} }
NSString* title = nil; NSString* title = l10n_util::GetNSString(IDS_IOS_DISCONNECT_DIALOG_TITLE);
NSString* message = nil; NSString* message =
NSString* continueButtonTitle = nil; l10n_util::GetNSString(IDS_IOS_DISCONNECT_DIALOG_INFO_MOBILE);
NSString* clearDataButtonTitle = nil; NSString* continueButtonTitle =
l10n_util::GetNSString(IDS_IOS_DISCONNECT_DIALOG_CONTINUE_BUTTON_MOBILE);
if ([self authService] -> IsAuthenticatedIdentityManaged()) { if ([self authService] -> IsAuthenticatedIdentityManaged()) {
signin::IdentityManager* identityManager = signin::IdentityManager* identityManager =
IdentityManagerFactory::GetForBrowserState(_browser->GetBrowserState()); IdentityManagerFactory::GetForBrowserState(_browser->GetBrowserState());
...@@ -362,7 +361,6 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -362,7 +361,6 @@ typedef NS_ENUM(NSInteger, ItemType) {
std::string hosted_domain = accountInfo.has_value() std::string hosted_domain = accountInfo.has_value()
? accountInfo.value().hosted_domain ? accountInfo.value().hosted_domain
: std::string(); : std::string();
title = title =
l10n_util::GetNSString(IDS_IOS_MANAGED_DISCONNECT_DIALOG_TITLE_UNITY); l10n_util::GetNSString(IDS_IOS_MANAGED_DISCONNECT_DIALOG_TITLE_UNITY);
message = message =
...@@ -376,10 +374,7 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -376,10 +374,7 @@ typedef NS_ENUM(NSInteger, ItemType) {
l10n_util::GetNSString(IDS_IOS_DISCONNECT_DIALOG_INFO_MOBILE_UNITY); l10n_util::GetNSString(IDS_IOS_DISCONNECT_DIALOG_INFO_MOBILE_UNITY);
continueButtonTitle = l10n_util::GetNSString( continueButtonTitle = l10n_util::GetNSString(
IDS_IOS_DISCONNECT_DIALOG_CONTINUE_BUTTON_MOBILE); IDS_IOS_DISCONNECT_DIALOG_CONTINUE_BUTTON_MOBILE);
clearDataButtonTitle = l10n_util::GetNSString(
IDS_IOS_DISCONNECT_DIALOG_CONTINUE_AND_CLEAR_MOBILE);
} }
_alertCoordinator = _alertCoordinator =
[[AlertCoordinator alloc] initWithBaseViewController:self [[AlertCoordinator alloc] initWithBaseViewController:self
title:title title:title
...@@ -389,41 +384,28 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -389,41 +384,28 @@ typedef NS_ENUM(NSInteger, ItemType) {
action:nil action:nil
style:UIAlertActionStyleCancel]; style:UIAlertActionStyleCancel];
__weak AccountsTableViewController* weakSelf = self; __weak AccountsTableViewController* weakSelf = self;
[_alertCoordinator [_alertCoordinator addItemWithTitle:continueButtonTitle
addItemWithTitle:continueButtonTitle action:^{
action:^{ [weakSelf handleDisconnect];
[weakSelf handleDisconnectWithForceClearSyncData:NO]; }
} style:UIAlertActionStyleDefault];
style:UIAlertActionStyleDefault];
if (base::FeatureList::IsEnabled(kClearSyncedData)) {
[_alertCoordinator
addItemWithTitle:clearDataButtonTitle
action:^{
[weakSelf handleDisconnectWithForceClearSyncData:YES];
}
style:UIAlertActionStyleDestructive];
}
[_alertCoordinator start]; [_alertCoordinator start];
} }
- (void)handleDisconnectWithForceClearSyncData:(BOOL)forceClearSyncData { - (void)handleDisconnect {
AuthenticationService* authService = [self authService]; AuthenticationService* authService = [self authService];
if (authService->IsAuthenticated()) { if (authService->IsAuthenticated()) {
_authenticationOperationInProgress = YES; _authenticationOperationInProgress = YES;
[self preventUserInteraction]; [self preventUserInteraction];
authService->SignOut( authService->SignOut(
signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, forceClearSyncData, ^{ signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS,
/*force_clear_browsing_data=*/false, ^{
[self allowUserInteraction]; [self allowUserInteraction];
_authenticationOperationInProgress = NO; _authenticationOperationInProgress = NO;
[base::mac::ObjCCastStrict<SettingsNavigationController>( [base::mac::ObjCCastStrict<SettingsNavigationController>(
self.navigationController) self.navigationController)
popViewControllerOrCloseSettingsAnimated:YES]; popViewControllerOrCloseSettingsAnimated:YES];
}); });
if (base::FeatureList::IsEnabled(kClearSyncedData)) {
UMA_HISTOGRAM_BOOLEAN("Signin.UserRequestedWipeDataOnSignout",
forceClearSyncData);
}
} }
} }
......
...@@ -96,8 +96,7 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) { ...@@ -96,8 +96,7 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
// Sign in to |fakeIdentity1|. // Sign in to |fakeIdentity1|.
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity1]; [SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity1];
[SigninEarlGreyUI [SigninEarlGreyUI signOutWithManagedAccount:NO];
signOutWithSignOutConfirmation:SignOutConfirmationNonManagedUser];
// Sign in with |fakeIdentity2|. // Sign in with |fakeIdentity2|.
[ChromeEarlGreyUI openSettingsMenu]; [ChromeEarlGreyUI openSettingsMenu];
...@@ -179,8 +178,7 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) { ...@@ -179,8 +178,7 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity]; [SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
// Sign out. // Sign out.
[SigninEarlGreyUI [SigninEarlGreyUI signOutWithManagedAccount:NO];
signOutWithSignOutConfirmation:SignOutConfirmationNonManagedUser];
} }
// Tests that signing out of a managed account from the Settings works // Tests that signing out of a managed account from the Settings works
...@@ -192,8 +190,7 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) { ...@@ -192,8 +190,7 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity isManagedAccount:YES]; [SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity isManagedAccount:YES];
// Sign out. // Sign out.
[SigninEarlGreyUI [SigninEarlGreyUI signOutWithManagedAccount:YES];
signOutWithSignOutConfirmation:SignOutConfirmationManagedUser];
// Check that there is no signed in user. // Check that there is no signed in user.
[SigninEarlGreyUtils checkSignedOut]; [SigninEarlGreyUtils checkSignedOut];
...@@ -273,8 +270,8 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) { ...@@ -273,8 +270,8 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity2]; [SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity2];
// Sign out. // Sign out.
[SigninEarlGreyUI [SigninEarlGreyUI signOutWithManagedAccount:NO];
signOutWithSignOutConfirmation:SignOutConfirmationNonManagedUser];
// Sign in with |fakeIdentity1|. // Sign in with |fakeIdentity1|.
[ChromeEarlGreyUI openSettingsMenu]; [ChromeEarlGreyUI openSettingsMenu];
[[EarlGrey selectElementWithMatcher:SecondarySignInButton()] [[EarlGrey selectElementWithMatcher:SecondarySignInButton()]
......
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