Skip to content

Commit

Permalink
[iOS] Remove unused constants for first run view controller.
Browse files Browse the repository at this point in the history
Use the accessibility label directly in the first run EarlGrey tests.
This makes it simpler to transition to the new sign-in architecture.
See go/chrome-ios-signin-migration for more details.

Bug: 1005509
Change-Id: I4afa65b02169927c919cb51dd9884bb828a55fd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144082
Reviewed-by: Jérôme Lebel <jlebel@chromium.org>
Commit-Queue: Nohemi Fernandez <fernandex@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758767}
  • Loading branch information
Nohemi Fernandez authored and Commit Bot committed Apr 14, 2020
1 parent 5f89679 commit 3c2b14e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ - (instancetype)initWithBrowser:(Browser*)browser
- (void)viewDidLoad {
[super viewDidLoad];
[self.navigationController setNavigationBarHidden:YES];
self.primaryButton.accessibilityIdentifier =
first_run::kSignInButtonAccessibilityIdentifier;
self.secondaryButton.accessibilityIdentifier =
first_run::kSignInSkipButtonAccessibilityIdentifier;
}

- (void)viewDidAppear:(BOOL)animated {
Expand Down
4 changes: 0 additions & 4 deletions ios/chrome/browser/ui/first_run/first_run_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@

namespace first_run {

// The accessibility identifier for the sign in button shown in first run.
extern NSString* const kSignInButtonAccessibilityIdentifier;
// The accessibility identifier for the skip sign in button shown in first run.
extern NSString* const kSignInSkipButtonAccessibilityIdentifier;
// The accessibility identifier for the UMA collection checkbox shown in first
// run.
extern NSString* const kUMAMetricsButtonAccessibilityIdentifier;
Expand Down
4 changes: 0 additions & 4 deletions ios/chrome/browser/ui/first_run/first_run_constants.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@

namespace first_run {

NSString* const kSignInButtonAccessibilityIdentifier =
@"SignInButtonAccessibilityIdentifier";
NSString* const kSignInSkipButtonAccessibilityIdentifier =
@"SkipButtonAccessibilityIdentifier";
NSString* const kUMAMetricsButtonAccessibilityIdentifier =
@"UMAMetricsButtonAccessibilityIdentifier";

Expand Down
4 changes: 2 additions & 2 deletions ios/chrome/browser/ui/first_run/first_run_egtest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

// Returns matcher for the skip sign in button.
id<GREYMatcher> SkipSigninButton() {
return grey_accessibilityID(
first_run::kSignInSkipButtonAccessibilityIdentifier);
return ButtonWithAccessibilityLabel(
l10n_util::GetNSString(IDS_IOS_FIRSTRUN_ACCOUNT_CONSISTENCY_SKIP_BUTTON));
}
}

Expand Down

0 comments on commit 3c2b14e

Please sign in to comment.