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.

(cherry picked from commit ec727b4)

Bug: 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-Original-Commit-Position: refs/heads/main@{#974840}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3492797
Auto-Submit: Vishwas Uppoor <vishwasuppoor@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Siyu An <siyua@chromium.org>
Cr-Commit-Position: refs/branch-heads/4896@{chromium#145}
Cr-Branched-From: 1f63ff4-refs/heads/main@{#972766}
  • Loading branch information
Vishwas Uppoor authored and Chromium LUCI CQ committed Feb 28, 2022
1 parent 72e29b9 commit d81c38a
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 d81c38a

Please sign in to comment.