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

Side by Side Diff: chrome/browser/autofill/autofill_merge_unittest.cc

Issue 10797017: base: Make ScopedVector::clear() destroy elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update location_bar_view_mac.mm Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerMock); 82 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerMock);
83 }; 83 };
84 84
85 PersonalDataManagerMock::PersonalDataManagerMock() : PersonalDataManager() { 85 PersonalDataManagerMock::PersonalDataManagerMock() : PersonalDataManager() {
86 } 86 }
87 87
88 PersonalDataManagerMock::~PersonalDataManagerMock() { 88 PersonalDataManagerMock::~PersonalDataManagerMock() {
89 } 89 }
90 90
91 void PersonalDataManagerMock::Reset() { 91 void PersonalDataManagerMock::Reset() {
92 profiles_.reset(); 92 profiles_.clear();
93 } 93 }
94 94
95 void PersonalDataManagerMock::SaveImportedProfile( 95 void PersonalDataManagerMock::SaveImportedProfile(
96 const AutofillProfile& profile) { 96 const AutofillProfile& profile) {
97 std::vector<AutofillProfile> profiles; 97 std::vector<AutofillProfile> profiles;
98 if (!MergeProfile(profile, profiles_.get(), &profiles)) 98 if (!MergeProfile(profile, profiles_.get(), &profiles))
99 profiles_.push_back(new AutofillProfile(profile)); 99 profiles_.push_back(new AutofillProfile(profile));
100 } 100 }
101 101
102 const std::vector<AutofillProfile*>& PersonalDataManagerMock::web_profiles() 102 const std::vector<AutofillProfile*>& PersonalDataManagerMock::web_profiles()
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 } 209 }
210 210
211 *merged_profiles = SerializeProfiles(personal_data_.web_profiles()); 211 *merged_profiles = SerializeProfiles(personal_data_.web_profiles());
212 } 212 }
213 213
214 TEST_F(AutofillMergeTest, DataDrivenMergeProfiles) { 214 TEST_F(AutofillMergeTest, DataDrivenMergeProfiles) {
215 RunDataDrivenTest(GetInputDirectory(kTestName), GetOutputDirectory(kTestName), 215 RunDataDrivenTest(GetInputDirectory(kTestName), GetOutputDirectory(kTestName),
216 kFileNamePattern); 216 kFileNamePattern);
217 } 217 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_manager_unittest.cc ('k') | chrome/browser/autofill/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698