Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: components/autofill/core/browser/webdata/autofill_table_unittest.cc

Issue 2658843004: [Autofill] Convert wallet addresses to local autofill profiles. (Closed)
Patch Set: Change how to get server cards Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/autofill/core/browser/webdata/autofill_table.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/webdata/autofill_table_unittest.cc
diff --git a/components/autofill/core/browser/webdata/autofill_table_unittest.cc b/components/autofill/core/browser/webdata/autofill_table_unittest.cc
index 2d784bb1e7fc60a2b3a74b3829c4305ba46ab2ec..235dd06230b05e92ab49f59c49c1252a7a7af676 100644
--- a/components/autofill/core/browser/webdata/autofill_table_unittest.cc
+++ b/components/autofill/core/browser/webdata/autofill_table_unittest.cc
@@ -1849,8 +1849,8 @@ TEST_F(AutofillTableTest, SetServerProfileUpdateUsageStats) {
table_->GetServerProfiles(&outputs);
ASSERT_EQ(1u, outputs.size());
EXPECT_EQ(one.server_id(), outputs[0]->server_id());
- EXPECT_EQ(0U, outputs[0]->use_count());
- EXPECT_EQ(base::Time(), outputs[0]->use_date());
+ EXPECT_EQ(1U, outputs[0]->use_count());
+ EXPECT_NE(base::Time(), outputs[0]->use_date());
// We don't track modification date for server profiles. It should always be
// base::Time().
EXPECT_EQ(base::Time(), outputs[0]->modification_date());
@@ -1877,18 +1877,6 @@ TEST_F(AutofillTableTest, SetServerProfileUpdateUsageStats) {
EXPECT_NE(base::Time(), outputs[0]->use_date());
EXPECT_EQ(base::Time(), outputs[0]->modification_date());
outputs.clear();
-
- // Set a null profile list --- this should clear metadata.
- table_->SetServerProfiles(std::vector<AutofillProfile>());
- // Reset the old profile list and see the metadata is reset.
- table_->SetServerProfiles(inputs);
- table_->GetServerProfiles(&outputs);
- ASSERT_EQ(1u, outputs.size());
- EXPECT_EQ(one.server_id(), outputs[0]->server_id());
- EXPECT_EQ(0U, outputs[0]->use_count());
- EXPECT_EQ(base::Time(), outputs[0]->use_date());
- EXPECT_EQ(base::Time(), outputs[0]->modification_date());
- outputs.clear();
}
// Tests that deleting time ranges re-masks server credit cards that were
« no previous file with comments | « components/autofill/core/browser/webdata/autofill_table.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698