Commit b1a5ca8c authored by Nohemi Fernandez's avatar Nohemi Fernandez Committed by Commit Bot

[iOS] Migrate EarlGrey tests to use SigninEarlGrey helper class.

During the EG1 to EG2 migration a duplicate testing class was created to
help expose necessary class-specific methods to EarlGrey. Now that the
transition is complete we will remove the dependency to
SigninEarlGreyAppInterface helper class and only expose SigninEarlGrey
to client code.

This patch also uses the more canonical 'verify' prefix for EarlGrey
assertions.

Bug: 1103274
Change-Id: I7cf71df0826068e79c8e0006744907fe36c70be5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352931
Commit-Queue: Nohemi Fernandez <fernandex@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797636}
parent 2185253d
......@@ -6,7 +6,6 @@
#include "base/macros.h"
#import "ios/chrome/browser/metrics/metrics_app_interface.h"
#import "ios/chrome/browser/ui/authentication/signin_earl_grey.h"
#import "ios/chrome/browser/ui/authentication/signin_earl_grey_app_interface.h"
#import "ios/chrome/browser/ui/authentication/signin_earl_grey_ui.h"
#import "ios/chrome/test/earl_grey/chrome_actions.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
......@@ -93,9 +92,7 @@ using chrome_test_util::SettingsDoneButton;
// Note: URL-keyed anonymized data collection is turned off as part of the
// flow to Sign out of Chrome and Turn sync off. This matches the main user
// flow that disables UKM.
if (![SigninEarlGreyAppInterface isSignedOut]) {
[SigninEarlGreyAppInterface signOut];
}
[SigninEarlGrey signOut];
[ChromeEarlGrey waitForSyncInitialized:NO
syncTimeout:syncher::kSyncUKMOperationsTimeout];
......@@ -274,7 +271,7 @@ using chrome_test_util::SettingsDoneButton;
// Corresponds to ConsentAddedButNoSyncCheck in //chrome/browser/metrics/
// ukm_browsertest.cc.
- (void)testConsentAddedButNoSync {
[SigninEarlGreyAppInterface signOut];
[SigninEarlGrey signOut];
[MetricsAppInterface setMetricsAndCrashReportingForTesting:NO];
GREYAssert([MetricsAppInterface checkUKMRecordingEnabled:NO],
@"Failed to assert that UKM was not enabled.");
......@@ -347,7 +344,7 @@ using chrome_test_util::SettingsDoneButton;
#endif
const uint64_t clientID1 = [MetricsAppInterface UKMClientID];
[SigninEarlGreyAppInterface signOut];
[SigninEarlGrey signOut];
GREYAssert([MetricsAppInterface checkUKMRecordingEnabled:NO],
@"Failed to assert that UKM was not enabled.");
......
......@@ -147,6 +147,7 @@ source_set("eg_app_support+eg2") {
"signin_earl_grey_app_interface.h",
"signin_earl_grey_app_interface.mm",
]
visibility = [ "//ios/chrome/test/earl_grey:eg_app_support+eg2" ]
deps = [
":authentication",
"unified_consent",
......
......@@ -101,7 +101,7 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
performAction:grey_tap()];
// Check the signed-in user did change.
[SigninEarlGrey checkSignedInWithFakeIdentity:fakeIdentity2];
[SigninEarlGrey verifySignedInWithFakeIdentity:fakeIdentity2];
[[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
performAction:grey_tap()];
......@@ -133,7 +133,7 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
// Check |fakeIdentity| is signed-in.
[SigninEarlGrey checkSignedInWithFakeIdentity:fakeIdentity];
[SigninEarlGrey verifySignedInWithFakeIdentity:fakeIdentity];
}
// Tests signing in with one account, switching sync account to a second and
......@@ -174,7 +174,7 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
signOutWithSignOutConfirmation:SignOutConfirmationManagedUser];
// Check that there is no signed in user.
[SigninEarlGrey checkSignedOut];
[SigninEarlGrey verifySignedOut];
}
// Tests that signing in, tapping the Settings link on the confirmation screen
......@@ -196,7 +196,7 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
[[EarlGrey selectElementWithMatcher:settings_matcher]
assertWithMatcher:grey_sufficientlyVisible()];
// Test the user is signed in.
[SigninEarlGrey checkSignedInWithFakeIdentity:fakeIdentity];
[SigninEarlGrey verifySignedInWithFakeIdentity:fakeIdentity];
}
// Opens the sign in screen and then cancel it by opening a new tab. Ensures
......@@ -290,7 +290,7 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
performAction:grey_tap()];
[[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
performAction:grey_tap()];
[SigninEarlGrey checkSignedOut];
[SigninEarlGrey verifySignedOut];
}
// Opens the sign in screen from the bookmarks and then cancel it by tapping on
......@@ -420,7 +420,7 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
ButtonWithAccessibilityLabel(GetNSString(
IDS_IOS_ADVANCED_SIGNIN_SETTINGS_CANCEL_SYNC_ALERT_CANCEL_SYNC_BUTTON))]
performAction:grey_tap()];
[SigninEarlGrey checkSignedOut];
[SigninEarlGrey verifySignedOut];
}
#pragma mark - Utils
......@@ -482,10 +482,10 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
if (tapSettingsLink) {
// Should be signed in.
[SigninEarlGrey checkSignedInWithFakeIdentity:fakeIdentity];
[SigninEarlGrey verifySignedInWithFakeIdentity:fakeIdentity];
} else {
// Should be not signed in.
[SigninEarlGrey checkSignedOut];
[SigninEarlGrey verifySignedOut];
}
}
......
......@@ -36,12 +36,19 @@
// simulate identity removal from the device.
- (void)forgetFakeIdentity:(FakeChromeIdentity*)fakeIdentity;
// Signs the user out of the primary account. Induces a GREYAssert if the
// app fails to sign out.
- (void)signOut;
// Induces a GREYAssert if |fakeIdentity| is not signed in to the active
// profile.
- (void)checkSignedInWithFakeIdentity:(FakeChromeIdentity*)fakeIdentity;
- (void)verifySignedInWithFakeIdentity:(FakeChromeIdentity*)fakeIdentity;
// Induces a GREYAssert if an identity is signed in.
- (void)checkSignedOut;
- (void)verifySignedOut;
// Induces a GREYAssert if there are no signed-in identities.
- (void)verifyAuthenticated;
@end
......
......@@ -35,7 +35,12 @@
[SigninEarlGreyAppInterface forgetFakeIdentity:fakeIdentity];
}
- (void)checkSignedInWithFakeIdentity:(FakeChromeIdentity*)fakeIdentity {
- (void)signOut {
[SigninEarlGreyAppInterface signOut];
[self verifySignedOut];
}
- (void)verifySignedInWithFakeIdentity:(FakeChromeIdentity*)fakeIdentity {
BOOL fakeIdentityIsNonNil = fakeIdentity != nil;
EG_TEST_HELPER_ASSERT_TRUE(fakeIdentityIsNonNil, @"Need to give an identity");
......@@ -63,7 +68,7 @@
[fakeIdentity.gaiaID isEqualToString:primaryAccountGaiaID], errorStr);
}
- (void)checkSignedOut {
- (void)verifySignedOut {
// 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 through
// the assert.
......@@ -73,4 +78,9 @@
@"Unexpected signed in user");
}
- (void)verifyAuthenticated {
EG_TEST_HELPER_ASSERT_TRUE([SigninEarlGreyAppInterface isAuthenticated],
@"User is not signed in");
}
@end
......@@ -50,7 +50,7 @@ using chrome_test_util::SignOutAccountsButton;
}
[[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
performAction:grey_tap()];
[SigninEarlGrey checkSignedInWithFakeIdentity:fakeIdentity];
[SigninEarlGrey verifySignedInWithFakeIdentity:fakeIdentity];
}
+ (void)selectIdentityWithEmail:(NSString*)userEmail {
......@@ -225,7 +225,7 @@ using chrome_test_util::SignOutAccountsButton;
[ChromeEarlGreyUI waitForAppToIdle];
[[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
performAction:grey_tap()];
[SigninEarlGrey checkSignedOut];
[SigninEarlGrey verifySignedOut];
}
+ (void)tapRemoveAccountFromDeviceWithFakeIdentity:
......
......@@ -140,7 +140,7 @@ id<GREYMatcher> SkipSigninButton() {
[[EarlGrey selectElementWithMatcher:SyncSettingsConfirmButton()]
performAction:grey_tap()];
[SigninEarlGrey checkSignedInWithFakeIdentity:fakeIdentity];
[SigninEarlGrey verifySignedInWithFakeIdentity:fakeIdentity];
GREYAssertTrue([FirstRunAppInterface isSyncFirstSetupComplete],
@"Sync should have finished its original setup");
......
......@@ -89,7 +89,7 @@ id<GREYMatcher> NoBookmarksLabel() {
[[EarlGrey selectElementWithMatcher:PrimarySignInButton()]
assertWithMatcher:grey_sufficientlyVisible()];
[SigninEarlGrey checkSignedOut];
[SigninEarlGrey verifySignedOut];
[[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
performAction:grey_tap()];
......@@ -113,7 +113,7 @@ id<GREYMatcher> NoBookmarksLabel() {
[[EarlGrey selectElementWithMatcher:PrimarySignInButton()]
assertWithMatcher:grey_sufficientlyVisible()];
[SigninEarlGrey checkSignedOut];
[SigninEarlGrey verifySignedOut];
[[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
performAction:grey_tap()];
......@@ -148,7 +148,7 @@ id<GREYMatcher> NoBookmarksLabel() {
fakeIdentity2.userEmail),
grey_sufficientlyVisible(), nil)]
assertWithMatcher:grey_nil()];
[SigninEarlGrey checkSignedInWithFakeIdentity:fakeIdentity1];
[SigninEarlGrey verifySignedInWithFakeIdentity:fakeIdentity1];
[[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
performAction:grey_tap()];
......@@ -177,7 +177,7 @@ id<GREYMatcher> NoBookmarksLabel() {
// Check that the user is signed out and the Main Settings screen is shown.
[[EarlGrey selectElementWithMatcher:PrimarySignInButton()]
assertWithMatcher:grey_sufficientlyVisible()];
[SigninEarlGrey checkSignedOut];
[SigninEarlGrey verifySignedOut];
[[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
performAction:grey_tap()];
......@@ -290,7 +290,7 @@ id<GREYMatcher> NoBookmarksLabel() {
[[EarlGrey selectElementWithMatcher:chrome_test_util::
SettingsAccountsCollectionView()]
assertWithMatcher:grey_sufficientlyVisible()];
[SigninEarlGrey checkSignedInWithFakeIdentity:fakeIdentity];
[SigninEarlGrey verifySignedInWithFakeIdentity:fakeIdentity];
[[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
performAction:grey_tap()];
......
......@@ -65,7 +65,7 @@ using chrome_test_util::ButtonWithAccessibilityLabelId;
[SigninEarlGreyUI confirmSigninConfirmationDialog];
// User signed in.
[SigninEarlGrey checkSignedInWithFakeIdentity:fakeIdentity];
[SigninEarlGrey verifySignedInWithFakeIdentity:fakeIdentity];
[SigninEarlGreyUI checkSigninPromoNotVisible];
[[EarlGrey selectElementWithMatcher:SettingsAccountButton()]
assertWithMatcher:grey_interactable()];
......@@ -84,7 +84,7 @@ using chrome_test_util::ButtonWithAccessibilityLabelId;
[SigninEarlGreyUI confirmSigninConfirmationDialog];
// User signed in.
[SigninEarlGrey checkSignedInWithFakeIdentity:fakeIdentity];
[SigninEarlGrey verifySignedInWithFakeIdentity:fakeIdentity];
[SigninEarlGreyUI checkSigninPromoNotVisible];
[[EarlGrey selectElementWithMatcher:SettingsAccountButton()]
assertWithMatcher:grey_interactable()];
......
......@@ -4,7 +4,7 @@
#include "base/strings/sys_string_conversions.h"
#import "base/test/ios/wait_util.h"
#import "ios/chrome/browser/ui/authentication/signin_earl_grey_app_interface.h"
#import "ios/chrome/browser/ui/authentication/signin_earl_grey.h"
#import "ios/chrome/browser/ui/authentication/signin_earl_grey_ui.h"
#import "ios/chrome/browser/ui/bookmarks/bookmark_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
......@@ -69,8 +69,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
[BookmarkEarlGrey addBookmarkWithTitle:@"foo" URL:@"https://www.foo.com"];
// Sign in to sync, after a bookmark has been added.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
// Assert that the correct number of bookmarks have been synced.
......@@ -80,8 +80,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
// Tests that a bookmark added on the client is uploaded to the Sync server.
- (void)testSyncUploadBookmark {
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
// Add a bookmark after sync is initialized.
......@@ -98,8 +98,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
[ChromeEarlGrey addFakeSyncServerBookmarkWithURL:URL title:"hoo"];
// Sign in to sync, after a bookmark has been injected in the sync server.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
[ChromeEarlGrey waitForSyncInitialized:YES syncTimeout:kSyncOperationTimeout];
[BookmarkEarlGrey verifyBookmarksWithTitle:@"hoo" expectedCount:1];
......@@ -108,8 +108,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
// Tests that the local cache guid does not change when sync is restarted.
- (void)testSyncCheckSameCacheGuid_SyncRestarted {
// Sign in the fake identity.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
[ChromeEarlGrey waitForSyncInitialized:YES syncTimeout:kSyncOperationTimeout];
......@@ -129,15 +129,14 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
// signs back in with the same account.
- (void)testSyncCheckDifferentCacheGuid_SignOutAndSignIn {
// Sign in a fake identity, and store the initial sync guid.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
[ChromeEarlGrey waitForSyncInitialized:YES syncTimeout:kSyncOperationTimeout];
std::string original_guid = [ChromeEarlGrey syncCacheGUID];
GREYAssert([SigninEarlGreyAppInterface isAuthenticated],
@"User is not signed in.");
[SigninEarlGreyAppInterface signOut];
[SigninEarlGrey verifyAuthenticated];
[SigninEarlGrey signOut];
[ChromeEarlGrey waitForSyncInitialized:NO syncTimeout:kSyncOperationTimeout];
// Sign the user back in, and verify the guid has changed.
......@@ -153,14 +152,13 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
// Test for http://crbug.com/413611 .
- (void)testSyncCheckSameCacheGuid_SyncRestartedAfterSignOutAndSignIn {
// Sign in a fake idenitty.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
[ChromeEarlGrey waitForSyncInitialized:YES syncTimeout:kSyncOperationTimeout];
GREYAssert([SigninEarlGreyAppInterface isAuthenticated],
@"User is not signed in.");
[SigninEarlGreyAppInterface signOut];
[SigninEarlGrey verifyAuthenticated];
[SigninEarlGrey signOut];
[ChromeEarlGrey waitForSyncInitialized:NO syncTimeout:kSyncOperationTimeout];
// Sign the user back in.
......@@ -193,8 +191,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
}];
// Sign in to sync.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
// Verify that the autofill profile has been downloaded.
......@@ -221,8 +219,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
}];
// Sign in to sync.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
// Verify that the autofill profile has been downloaded.
......@@ -266,8 +264,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
}];
// Sign in to sync.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
// Verify that the autofill profile has been downloaded
......@@ -306,8 +304,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
[ChromeEarlGrey loadURL:URL2];
// Sign in to sync, after opening two tabs.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
// Verify the sessions on the sync server.
......@@ -333,8 +331,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
[ChromeEarlGrey addHistoryServiceTypedURL:mockURL];
// Sign in to sync.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
[ChromeEarlGrey waitForSyncInitialized:YES syncTimeout:kSyncOperationTimeout];
......@@ -360,8 +358,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
[ChromeEarlGrey addFakeSyncServerTypedURL:mockURL];
// Sign in to sync.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
[ChromeEarlGrey waitForSyncInitialized:YES syncTimeout:kSyncOperationTimeout];
......@@ -386,8 +384,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
[ChromeEarlGrey addFakeSyncServerTypedURL:mockURL];
// Sign in to sync.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
[ChromeEarlGrey waitForSyncInitialized:YES syncTimeout:kSyncOperationTimeout];
......@@ -420,8 +418,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
[ChromeEarlGrey addHistoryServiceTypedURL:mockURL];
// Sign in to sync.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
[ChromeEarlGrey waitForSyncInitialized:YES syncTimeout:kSyncOperationTimeout];
......@@ -462,8 +460,8 @@ void AssertNumberOfEntities(int entity_count, syncer::ModelType entity_type) {
originator_client_item_id:"1"];
// Sign in to sync.
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyAppInterface fakeIdentity1];
[SigninEarlGreyAppInterface addFakeIdentity:fakeIdentity];
FakeChromeIdentity* fakeIdentity = [SigninEarlGrey fakeIdentity1];
[SigninEarlGrey addFakeIdentity:fakeIdentity];
[SigninEarlGreyUI signinWithFakeIdentity:fakeIdentity];
[ChromeEarlGrey waitForSyncInitialized:YES syncTimeout:kSyncOperationTimeout];
......
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