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

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

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 <map> 5 #include <map>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 } 75 }
76 } 76 }
77 77
78 return result; 78 return result;
79 } 79 }
80 80
81 class PersonalDataManagerMock : public PersonalDataManager { 81 class PersonalDataManagerMock : public PersonalDataManager {
82 public: 82 public:
83 PersonalDataManagerMock(); 83 PersonalDataManagerMock();
84 virtual ~PersonalDataManagerMock(); 84 ~PersonalDataManagerMock() override;
85 85
86 // Reset the saved profiles. 86 // Reset the saved profiles.
87 void Reset(); 87 void Reset();
88 88
89 // PersonalDataManager: 89 // PersonalDataManager:
90 virtual std::string SaveImportedProfile( 90 std::string SaveImportedProfile(const AutofillProfile& profile) override;
91 const AutofillProfile& profile) override; 91 const std::vector<AutofillProfile*>& web_profiles() const override;
92 virtual const std::vector<AutofillProfile*>& web_profiles() const override;
93 92
94 private: 93 private:
95 ScopedVector<AutofillProfile> profiles_; 94 ScopedVector<AutofillProfile> profiles_;
96 95
97 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerMock); 96 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerMock);
98 }; 97 };
99 98
100 PersonalDataManagerMock::PersonalDataManagerMock() 99 PersonalDataManagerMock::PersonalDataManagerMock()
101 : PersonalDataManager("en-US") { 100 : PersonalDataManager("en-US") {
102 } 101 }
(...skipping 30 matching lines...) Expand all
133 class AutofillMergeTest : public testing::Test, 132 class AutofillMergeTest : public testing::Test,
134 public DataDrivenTest { 133 public DataDrivenTest {
135 protected: 134 protected:
136 AutofillMergeTest(); 135 AutofillMergeTest();
137 virtual ~AutofillMergeTest(); 136 virtual ~AutofillMergeTest();
138 137
139 // testing::Test: 138 // testing::Test:
140 virtual void SetUp(); 139 virtual void SetUp();
141 140
142 // DataDrivenTest: 141 // DataDrivenTest:
143 virtual void GenerateResults(const std::string& input, 142 void GenerateResults(const std::string& input, std::string* output) override;
144 std::string* output) override;
145 143
146 // Deserializes a set of Autofill profiles from |profiles|, imports each 144 // Deserializes a set of Autofill profiles from |profiles|, imports each
147 // sequentially, and fills |merged_profiles| with the serialized result. 145 // sequentially, and fills |merged_profiles| with the serialized result.
148 void MergeProfiles(const std::string& profiles, std::string* merged_profiles); 146 void MergeProfiles(const std::string& profiles, std::string* merged_profiles);
149 147
150 // Deserializes |str| into a field type. 148 // Deserializes |str| into a field type.
151 ServerFieldType StringToFieldType(const std::string& str); 149 ServerFieldType StringToFieldType(const std::string& str);
152 150
153 PersonalDataManagerMock personal_data_; 151 PersonalDataManagerMock personal_data_;
154 152
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 ServerFieldType AutofillMergeTest::StringToFieldType(const std::string& str) { 241 ServerFieldType AutofillMergeTest::StringToFieldType(const std::string& str) {
244 return string_to_field_type_map_[str]; 242 return string_to_field_type_map_[str];
245 } 243 }
246 244
247 TEST_F(AutofillMergeTest, DataDrivenMergeProfiles) { 245 TEST_F(AutofillMergeTest, DataDrivenMergeProfiles) {
248 RunDataDrivenTest(GetInputDirectory(kTestName), GetOutputDirectory(kTestName), 246 RunDataDrivenTest(GetInputDirectory(kTestName), GetOutputDirectory(kTestName),
249 kFileNamePattern); 247 kFileNamePattern);
250 } 248 }
251 249
252 } // namespace autofill 250 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698