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

Side by Side Diff: components/browser_sync/browser/profile_sync_service_autofill_unittest.cc

Issue 2187713005: [Merge M53] Apply autofill profile use-date fix after sync starts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « components/autofill/core/browser/personal_data_manager_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 using testing::Not; 94 using testing::Not;
95 using testing::SetArgumentPointee; 95 using testing::SetArgumentPointee;
96 using testing::Return; 96 using testing::Return;
97 97
98 namespace { 98 namespace {
99 99
100 void RegisterAutofillPrefs(user_prefs::PrefRegistrySyncable* registry) { 100 void RegisterAutofillPrefs(user_prefs::PrefRegistrySyncable* registry) {
101 registry->RegisterBooleanPref(autofill::prefs::kAutofillEnabled, true); 101 registry->RegisterBooleanPref(autofill::prefs::kAutofillEnabled, true);
102 registry->RegisterBooleanPref(autofill::prefs::kAutofillWalletImportEnabled, 102 registry->RegisterBooleanPref(autofill::prefs::kAutofillWalletImportEnabled,
103 true); 103 true);
104 registry->RegisterBooleanPref(autofill::prefs::kAutofillProfileUseDatesFixed,
105 true);
104 registry->RegisterIntegerPref(autofill::prefs::kAutofillLastVersionDeduped, 106 registry->RegisterIntegerPref(autofill::prefs::kAutofillLastVersionDeduped,
105 atoi(version_info::GetVersionNumber().c_str())); 107 atoi(version_info::GetVersionNumber().c_str()));
106 } 108 }
107 109
108 void RunAndSignal(const base::Closure& cb, WaitableEvent* event) { 110 void RunAndSignal(const base::Closure& cb, WaitableEvent* event) {
109 cb.Run(); 111 cb.Run();
110 event->Signal(); 112 event->Signal();
111 } 113 }
112 114
113 AutofillEntry MakeAutofillEntry(const char* name, 115 AutofillEntry MakeAutofillEntry(const char* name,
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 std::vector<AutofillEntry> sync_entries; 1480 std::vector<AutofillEntry> sync_entries;
1479 std::vector<AutofillProfile> sync_profiles; 1481 std::vector<AutofillProfile> sync_profiles;
1480 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); 1482 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles));
1481 EXPECT_EQ(3U, sync_entries.size()); 1483 EXPECT_EQ(3U, sync_entries.size());
1482 EXPECT_EQ(0U, sync_profiles.size()); 1484 EXPECT_EQ(0U, sync_profiles.size());
1483 for (size_t i = 0; i < sync_entries.size(); i++) { 1485 for (size_t i = 0; i < sync_entries.size(); i++) {
1484 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() 1486 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name()
1485 << ", " << sync_entries[i].key().value(); 1487 << ", " << sync_entries[i].key().value();
1486 } 1488 }
1487 } 1489 }
OLDNEW
« no previous file with comments | « components/autofill/core/browser/personal_data_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698