Commit d0105907 authored by Jan Krcal's avatar Jan Krcal Committed by Commit Bot

[AF] Integration tests for wallet metadata involving offline mode

This CL introduces several further integration tests for autofill wallet
metadata. All these tests involve "being offline" which is simulated by
the fake server returning errors.

This CL also changes the behavior in a minor way: it changes merging
two entities that have never been used. The change is non-controversial;
the main motivation for it is to allow writing crisper integration
tests.

Bug: 894001
Change-Id: I6e29c5ff8f96f6b40bb77f77e881ce1bb3ffbe25
Reviewed-on: https://chromium-review.googlesource.com/c/1335931
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Reviewed-by: default avatarSebastien Seguin-Gagnon <sebsg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613053}
parent f312bb2e
......@@ -83,7 +83,8 @@ bool ListsMatch(int profile_a,
}
Item* expected_item = &list_a_map[item->server_id()];
if (expected_item->Compare(*item) != 0 ||
expected_item->use_count() != item->use_count()) {
expected_item->use_count() != item->use_count() ||
expected_item->use_date() != item->use_date()) {
DVLOG(1) << "Mismatch in profile with server_id " << item->server_id()
<< ".";
return false;
......
......@@ -1027,8 +1027,10 @@ std::ostream& operator<<(std::ostream& os, const CreditCard& credit_card) {
<< base::UTF16ToUTF8(credit_card.GetRawInfo(CREDIT_CARD_NUMBER))
<< " "
<< base::UTF16ToUTF8(credit_card.GetRawInfo(CREDIT_CARD_EXP_MONTH))
<< " " << base::UTF16ToUTF8(
credit_card.GetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR));
<< " "
<< base::UTF16ToUTF8(
credit_card.GetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR))
<< " " << credit_card.use_count() << " " << credit_card.use_date();
}
void CreditCard::SetNameOnCardFromSeparateParts() {
......
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