OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 253 |
254 PersonalDataManager* personal_data_manager() { | 254 PersonalDataManager* personal_data_manager() { |
255 return PersonalDataManagerFactory::GetForProfile(browser()->profile()); | 255 return PersonalDataManagerFactory::GetForProfile(browser()->profile()); |
256 } | 256 } |
257 | 257 |
258 void CreateTestProfile() { | 258 void CreateTestProfile() { |
259 AutofillProfile profile; | 259 AutofillProfile profile; |
260 autofill_test::SetProfileInfo( | 260 autofill_test::SetProfileInfo( |
261 &profile, "Milton", "C.", "Waddams", | 261 &profile, "Milton", "C.", "Waddams", |
262 "red.swingline@initech.com", "Initech", "4120 Freidrich Lane", | 262 "red.swingline@initech.com", "Initech", "4120 Freidrich Lane", |
263 "Basement", "Austin", "Texas", "78744", "United States", "5125551234"); | 263 "Basement", "Austin", "Texas", "78744", "US", "5125551234"); |
264 | 264 |
265 WindowedPersonalDataManagerObserver observer(browser()); | 265 WindowedPersonalDataManagerObserver observer(browser()); |
266 personal_data_manager()->AddProfile(profile); | 266 personal_data_manager()->AddProfile(profile); |
267 | 267 |
268 // AddProfile is asynchronous. Wait for it to finish before continuing the | 268 // AddProfile is asynchronous. Wait for it to finish before continuing the |
269 // tests. | 269 // tests. |
270 observer.Wait(); | 270 observer.Wait(); |
271 } | 271 } |
272 | 272 |
273 void SetProfiles(std::vector<AutofillProfile>* profiles) { | 273 void SetProfiles(std::vector<AutofillProfile>* profiles) { |
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1712 // TODO(isherman): this looks redundant, consider removing. | 1712 // TODO(isherman): this looks redundant, consider removing. |
1713 // DISABLED: http://crbug.com/150084 | 1713 // DISABLED: http://crbug.com/150084 |
1714 IN_PROC_BROWSER_TEST_F(AutofillTest, | 1714 IN_PROC_BROWSER_TEST_F(AutofillTest, |
1715 DISABLED_MergeAggregatedDuplicatedProfiles) { | 1715 DISABLED_MergeAggregatedDuplicatedProfiles) { |
1716 int num_of_profiles = | 1716 int num_of_profiles = |
1717 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); | 1717 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); |
1718 | 1718 |
1719 ASSERT_GT(num_of_profiles, | 1719 ASSERT_GT(num_of_profiles, |
1720 static_cast<int>(personal_data_manager()->GetProfiles().size())); | 1720 static_cast<int>(personal_data_manager()->GetProfiles().size())); |
1721 } | 1721 } |
OLD | NEW |