Skip to content

Commit

Permalink
VCN upstream enrollment for Clank bug fix
Browse files Browse the repository at this point in the history
Build flag protect avatar animation check in VirtualCardEnrollmentManager::OnDidGetDetailsForEnrollResponse for Clank.

Bug: 1281695, 1300383
Change-Id: I69ba2151fc12a9164ecb40e5e1f38e6e19846c55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3486537
Reviewed-by: Siyu An <siyua@chromium.org>
Commit-Queue: Vishwas Uppoor <vishwasuppoor@google.com>
Cr-Commit-Position: refs/heads/main@{#974840}
  • Loading branch information
Vishwas Uppoor authored and Chromium LUCI CQ committed Feb 24, 2022
1 parent 2a7c67a commit ec727b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,13 @@ void VirtualCardEnrollmentManager::OnDidGetDetailsForEnrollResponse(
state_.virtual_card_enrollment_fields.credit_card.card_art_url());
}

#if !BUILDFLAG(IS_ANDROID)
if (state_.virtual_card_enrollment_fields.virtual_card_enrollment_source ==
VirtualCardEnrollmentSource::kUpstream &&
!avatar_animation_complete_) {
return;
}
#endif

if (autofill_client_) {
ShowVirtualCardEnrollBubble();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ TEST_F(VirtualCardEnrollmentManagerTest, Unenroll) {
/*succeeded=*/false, 1);
}

#if !BUILDFLAG(IS_ANDROID)
TEST_F(VirtualCardEnrollmentManagerTest, UpstreamAnimationSync_AnimationFirst) {
personal_data_manager_->ClearCreditCardArtImages();
SetUpCard();
Expand Down Expand Up @@ -495,5 +496,6 @@ TEST_F(VirtualCardEnrollmentManagerTest, UpstreamAnimationSync_ResponseFirst) {
virtual_card_enrollment_manager_->OnCardSavedAnimationComplete();
EXPECT_TRUE(virtual_card_enrollment_manager_->GetAvatarAnimationComplete());
}
#endif // !BUILDFLAG(IS_ANDROID)

} // namespace autofill

0 comments on commit ec727b4

Please sign in to comment.