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

Side by Side Diff: components/autofill/core/browser/personal_data_manager_unittest.cc

Issue 2177253003: Apply autofill profile use-date fix after sync starts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/core/browser/personal_data_manager.h" 5 #include "components/autofill/core/browser/personal_data_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 field_trial_list_.reset(); 143 field_trial_list_.reset();
144 144
145 // There are no features enabled by default. 145 // There are no features enabled by default.
146 base::FeatureList::ClearInstanceForTesting(); 146 base::FeatureList::ClearInstanceForTesting();
147 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); 147 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
148 base::FeatureList::SetInstance(std::move(feature_list)); 148 base::FeatureList::SetInstance(std::move(feature_list));
149 149
150 // Reset the deduping pref to its default value. 150 // Reset the deduping pref to its default value.
151 personal_data_->pref_service_->SetInteger( 151 personal_data_->pref_service_->SetInteger(
152 prefs::kAutofillLastVersionDeduped, 0); 152 prefs::kAutofillLastVersionDeduped, 0);
153 personal_data_->pref_service_->SetBoolean(
154 prefs::kAutofillProfileUseDatesFixed, false);
153 } 155 }
154 156
155 void TearDown() override { 157 void TearDown() override {
156 // Order of destruction is important as AutofillManager relies on 158 // Order of destruction is important as AutofillManager relies on
157 // PersonalDataManager to be around when it gets destroyed. 159 // PersonalDataManager to be around when it gets destroyed.
158 signin_manager_->Shutdown(); 160 signin_manager_->Shutdown();
159 signin_manager_.reset(); 161 signin_manager_.reset();
160 162
161 account_tracker_->Shutdown(); 163 account_tracker_->Shutdown();
162 account_tracker_.reset(); 164 account_tracker_.reset();
(...skipping 5053 matching lines...) Expand 10 before | Expand all | Expand 10 after
5216 EnableAutofillProfileCleanup(); 5218 EnableAutofillProfileCleanup();
5217 5219
5218 // The deduping routine should not be run. 5220 // The deduping routine should not be run.
5219 EXPECT_FALSE(personal_data_->ApplyDedupingRoutine()); 5221 EXPECT_FALSE(personal_data_->ApplyDedupingRoutine());
5220 5222
5221 // The two duplicate profiles should still be present. 5223 // The two duplicate profiles should still be present.
5222 EXPECT_EQ(2U, personal_data_->GetProfiles().size()); 5224 EXPECT_EQ(2U, personal_data_->GetProfiles().size());
5223 } 5225 }
5224 5226
5225 } // namespace autofill 5227 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698