Commit f2c0a44a authored by Alice Wang's avatar Alice Wang Committed by Commit Bot

[Android][WebSignin] Use correct icon for sign-in auth error

This CL sets up correct icon for sign-in auth error.

Bug: 1120308
Change-Id: I56f65ba780298bf36950164c0823652e7d9a9aac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2382121Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Commit-Queue: Alice Wang <aliceywang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805230}
parent eadadd67
......@@ -202,6 +202,7 @@ class AccountPickerBottomSheetView implements BottomSheetContent {
* Sets up the view for sign-in auth error.
*/
void setUpSignInAuthErrorView() {
mLogoImage.setImageResource(R.drawable.ic_warning_red_24dp);
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);
......
......@@ -205,6 +205,29 @@ public class AccountPickerBottomSheetRenderTest {
mCoordinator.getBottomSheetViewForTesting(), "signin_general_error_sheet");
}
@Test
@MediumTest
@Feature("RenderTest")
@ParameterAnnotations.UseMethodParameter(NightModeTestUtils.NightModeParams.class)
public void testSigninAuthErrorView(boolean nightModeEnabled) throws IOException {
mAccountManagerTestRule.addAccount(PROFILE_DATA1);
CoreAccountInfo coreAccountInfo =
mAccountManagerTestRule.toCoreAccountInfo(PROFILE_DATA1.getAccountName());
// Throws an authentication error during the sign-in action
doAnswer(invocation -> {
Callback<GoogleServiceAuthError> onSignInErrorCallback = invocation.getArgument(1);
onSignInErrorCallback.onResult(
new GoogleServiceAuthError(State.INVALID_GAIA_CREDENTIALS));
return null;
})
.when(mAccountPickerDelegateMock)
.signIn(eq(coreAccountInfo), any());
buildAndShowCollapsedBottomSheet();
clickContinueButtonAndWaitForErrorView();
mRenderTestRule.render(
mCoordinator.getBottomSheetViewForTesting(), "signin_auth_error_sheet");
}
private void clickContinueButtonAndWaitForErrorView() {
View bottomSheetView = mCoordinator.getBottomSheetViewForTesting();
TestThreadUtils.runOnUiThreadBlocking(() -> {
......
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