Index: components/browsing_data/core/browsing_data_utils_unittest.cc |
diff --git a/components/browsing_data/core/browsing_data_utils_unittest.cc b/components/browsing_data/core/browsing_data_utils_unittest.cc |
index fab89707492ab8f14027f6182468c8905e8776d5..ad4ea6531129d582cf0be4389f582631fab8453b 100644 |
--- a/components/browsing_data/core/browsing_data_utils_unittest.cc |
+++ b/components/browsing_data/core/browsing_data_utils_unittest.cc |
@@ -52,7 +52,7 @@ class BrowsingDataUtilsTest : public testing::Test { |
// Tests the complex output of the Autofill counter. |
TEST_F(BrowsingDataUtilsTest, AutofillCounterResult) { |
browsing_data::AutofillCounter counter( |
- scoped_refptr<FakeWebDataService>(new FakeWebDataService())); |
+ scoped_refptr<FakeWebDataService>(new FakeWebDataService()), nullptr); |
// Test all configurations of zero and nonzero partial results for datatypes. |
// Test singular and plural for each datatype. |
@@ -60,24 +60,29 @@ TEST_F(BrowsingDataUtilsTest, AutofillCounterResult) { |
int num_credit_cards; |
int num_addresses; |
int num_suggestions; |
+ bool sync_enabled; |
std::string expected_output; |
} kTestCases[] = { |
- {0, 0, 0, "none"}, |
- {1, 0, 0, "1 credit card"}, |
- {0, 5, 0, "5 addresses"}, |
- {0, 0, 1, "1 suggestion"}, |
- {0, 0, 2, "2 suggestions"}, |
- {4, 7, 0, "4 credit cards, 7 addresses"}, |
- {3, 0, 9, "3 credit cards, 9 other suggestions"}, |
- {0, 1, 1, "1 address, 1 other suggestion"}, |
- {9, 6, 3, "9 credit cards, 6 addresses, 3 others"}, |
- {4, 2, 1, "4 credit cards, 2 addresses, 1 other"}, |
+ {0, 0, 0, false, "none"}, |
+ {0, 0, 0, true, "none"}, |
+ {1, 0, 0, false, "1 credit card"}, |
+ {0, 5, 0, false, "5 addresses"}, |
+ {0, 0, 1, false, "1 suggestion"}, |
+ {0, 0, 2, false, "2 suggestions"}, |
+ {0, 0, 2, true, "2 suggestions (synced)"}, |
+ {4, 7, 0, false, "4 credit cards, 7 addresses"}, |
+ {4, 7, 0, true, "4 credit cards, 7 addresses (synced)"}, |
+ {3, 0, 9, false, "3 credit cards, 9 other suggestions"}, |
+ {0, 1, 1, false, "1 address, 1 other suggestion"}, |
+ {9, 6, 3, false, "9 credit cards, 6 addresses, 3 others"}, |
+ {4, 2, 1, false, "4 credit cards, 2 addresses, 1 other"}, |
+ {4, 2, 1, true, "4 credit cards, 2 addresses, 1 other (synced)"}, |
}; |
for (const TestCase& test_case : kTestCases) { |
browsing_data::AutofillCounter::AutofillResult result( |
&counter, test_case.num_suggestions, test_case.num_credit_cards, |
- test_case.num_addresses); |
+ test_case.num_addresses, test_case.sync_enabled); |
SCOPED_TRACE( |
base::StringPrintf("Test params: %d credit card(s), " |