Commit 0061e171 authored by Alice Wang's avatar Alice Wang Committed by Commit Bot

[Android][WebSignIn][UI] Add strings for web sign-in auth error

This CL adds subtitle and button strings for web sign-in auth error.

Screenshot: https://crbug.com/1116952#c3
Bug: 1116952
Change-Id: I251f3c6f24e98e3198828d8f25ae5eafd8c684dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368557Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Reviewed-by: default avatarTanmoy Mollik <triploblastic@chromium.org>
Commit-Queue: Alice Wang <aliceywang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801286}
parent a75e43fe
...@@ -152,11 +152,12 @@ class AccountPickerBottomSheetView implements BottomSheetContent { ...@@ -152,11 +152,12 @@ class AccountPickerBottomSheetView implements BottomSheetContent {
*/ */
void setUpSignInGeneralErrorView() { void setUpSignInGeneralErrorView() {
mAccountPickerTitle.setText(R.string.signin_account_picker_bottom_sheet_error_title); mAccountPickerTitle.setText(R.string.signin_account_picker_bottom_sheet_error_title);
mAccountPickerSubtitle.setText(R.string.signin_account_picker_general_error_subtitle);
mAccountPickerSubtitle.setVisibility(View.VISIBLE); mAccountPickerSubtitle.setVisibility(View.VISIBLE);
mContentView.findViewById(R.id.account_picker_signin_spinner_view) mContentView.findViewById(R.id.account_picker_signin_spinner_view)
.setVisibility(View.INVISIBLE); .setVisibility(View.INVISIBLE);
mContinueAsButton.setVisibility(View.VISIBLE);
mContinueAsButton.setText(R.string.signin_account_picker_general_error_button); mContinueAsButton.setText(R.string.signin_account_picker_general_error_button);
mContinueAsButton.setVisibility(View.VISIBLE);
mContentView.findViewById(R.id.account_picker_horizontal_divider).setVisibility(View.GONE); mContentView.findViewById(R.id.account_picker_horizontal_divider).setVisibility(View.GONE);
mSelectedAccountView.setVisibility(View.GONE); mSelectedAccountView.setVisibility(View.GONE);
...@@ -164,13 +165,14 @@ class AccountPickerBottomSheetView implements BottomSheetContent { ...@@ -164,13 +165,14 @@ class AccountPickerBottomSheetView implements BottomSheetContent {
/** /**
* Sets up the view for sign-in auth error. * Sets up the view for sign-in auth error.
* TODO(https://crbug.com/1116952): Add strings for subtitle and button for sign-in auth error
*/ */
void setUpSignInAuthErrorView() { void setUpSignInAuthErrorView() {
mAccountPickerTitle.setText(R.string.signin_account_picker_bottom_sheet_error_title); mAccountPickerTitle.setText(R.string.signin_account_picker_bottom_sheet_error_title);
mAccountPickerSubtitle.setText(R.string.signin_account_picker_auth_error_subtitle);
mAccountPickerSubtitle.setVisibility(View.VISIBLE); mAccountPickerSubtitle.setVisibility(View.VISIBLE);
mContentView.findViewById(R.id.account_picker_signin_spinner_view) mContentView.findViewById(R.id.account_picker_signin_spinner_view)
.setVisibility(View.INVISIBLE); .setVisibility(View.INVISIBLE);
mContinueAsButton.setText(R.string.auth_error_card_button);
mContinueAsButton.setVisibility(View.VISIBLE); mContinueAsButton.setVisibility(View.VISIBLE);
mContentView.findViewById(R.id.account_picker_horizontal_divider).setVisibility(View.GONE); mContentView.findViewById(R.id.account_picker_horizontal_divider).setVisibility(View.GONE);
......
...@@ -334,6 +334,9 @@ public class AccountPickerBottomSheetTest { ...@@ -334,6 +334,9 @@ public class AccountPickerBottomSheetTest {
}); });
onView(withText(R.string.signin_account_picker_bottom_sheet_error_title)) onView(withText(R.string.signin_account_picker_bottom_sheet_error_title))
.check(matches(isDisplayed())); .check(matches(isDisplayed()));
onView(withText(R.string.signin_account_picker_auth_error_subtitle))
.check(matches(isDisplayed()));
onView(withText(R.string.auth_error_card_button)).check(matches(isDisplayed()));
onView(withId(R.id.account_picker_horizontal_divider)).check(matches(not(isDisplayed()))); onView(withId(R.id.account_picker_horizontal_divider)).check(matches(not(isDisplayed())));
onView(withId(R.id.account_picker_selected_account)).check(matches(not(isDisplayed()))); onView(withId(R.id.account_picker_selected_account)).check(matches(not(isDisplayed())));
onView(withId(R.id.account_picker_signin_spinner_view)).check(matches(not(isDisplayed()))); onView(withId(R.id.account_picker_signin_spinner_view)).check(matches(not(isDisplayed())));
......
...@@ -2446,6 +2446,9 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p ...@@ -2446,6 +2446,9 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<message name="IDS_SIGNIN_ACCOUNT_PICKER_GENERAL_ERROR_SUBTITLE" desc="The subtitle of the account picker bottom sheet when something went wrong in the sign-in process"> <message name="IDS_SIGNIN_ACCOUNT_PICKER_GENERAL_ERROR_SUBTITLE" desc="The subtitle of the account picker bottom sheet when something went wrong in the sign-in process">
Chrome couldn’t verify your information Chrome couldn’t verify your information
</message> </message>
<message name="IDS_SIGNIN_ACCOUNT_PICKER_AUTH_ERROR_SUBTITLE" desc="The subtitle of the account picker bottom sheet when there is an authentication error with the credentials of the account selected.">
Sorry, we couldn’t validate your credentials
</message>
<message name="IDS_SIGNIN_ACCOUNT_PICKER_GENERAL_ERROR_BUTTON" desc="Button text of the account picker bottom sheet when something went wrong in the sign-in process. User can try again if they click it."> <message name="IDS_SIGNIN_ACCOUNT_PICKER_GENERAL_ERROR_BUTTON" desc="Button text of the account picker bottom sheet when something went wrong in the sign-in process. User can try again if they click it.">
Try again Try again
</message> </message>
......
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