| OLD | NEW |
| 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 "chrome/browser/sync/test/integration/autofill_helper.h" | 5 #include "chrome/browser/sync/test/integration/autofill_helper.h" |
| 6 | 6 |
| 7 #include "chrome/browser/autofill/autofill_common_test.h" | 7 #include "chrome/browser/autofill/autofill_common_test.h" |
| 8 #include "chrome/browser/autofill/autofill_profile.h" | 8 #include "chrome/browser/autofill/autofill_profile.h" |
| 9 #include "chrome/browser/autofill/autofill_type.h" | 9 #include "chrome/browser/autofill/autofill_type.h" |
| 10 #include "chrome/browser/autofill/personal_data_manager.h" | 10 #include "chrome/browser/autofill/personal_data_manager.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 AutofillProfile CreateAutofillProfile(ProfileType type) { | 90 AutofillProfile CreateAutofillProfile(ProfileType type) { |
| 91 AutofillProfile profile; | 91 AutofillProfile profile; |
| 92 switch (type) { | 92 switch (type) { |
| 93 case PROFILE_MARION: | 93 case PROFILE_MARION: |
| 94 autofill_test::SetProfileInfoWithGuid(&profile, | 94 autofill_test::SetProfileInfoWithGuid(&profile, |
| 95 "C837507A-6C3B-4872-AC14-5113F157D668", | 95 "C837507A-6C3B-4872-AC14-5113F157D668", |
| 96 "Marion", "Mitchell", "Morrison", | 96 "Marion", "Mitchell", "Morrison", |
| 97 "johnwayne@me.xyz", "Fox", | 97 "johnwayne@me.xyz", "Fox", |
| 98 "123 Zoo St.", "unit 5", "Hollywood", "CA", | 98 "123 Zoo St.", "unit 5", "Hollywood", "CA", |
| 99 "91601", "US", "12345678910", "01987654321"); | 99 "91601", "US", "12345678910"); |
| 100 break; | 100 break; |
| 101 case PROFILE_HOMER: | 101 case PROFILE_HOMER: |
| 102 autofill_test::SetProfileInfoWithGuid(&profile, | 102 autofill_test::SetProfileInfoWithGuid(&profile, |
| 103 "137DE1C3-6A30-4571-AC86-109B1ECFBE7F", | 103 "137DE1C3-6A30-4571-AC86-109B1ECFBE7F", |
| 104 "Homer", "J.", "Simpson", | 104 "Homer", "J.", "Simpson", |
| 105 "homer@abc.com", "SNPP", | 105 "homer@abc.com", "SNPP", |
| 106 "1 Main St", "PO Box 1", "Springfield", "MA", | 106 "1 Main St", "PO Box 1", "Springfield", "MA", |
| 107 "94101", "US", "14155551212", "14155551313"); | 107 "94101", "US", "14155551212"); |
| 108 break; | 108 break; |
| 109 case PROFILE_FRASIER: | 109 case PROFILE_FRASIER: |
| 110 autofill_test::SetProfileInfoWithGuid(&profile, | 110 autofill_test::SetProfileInfoWithGuid(&profile, |
| 111 "9A5E6872-6198-4688-BF75-0016E781BB0A", | 111 "9A5E6872-6198-4688-BF75-0016E781BB0A", |
| 112 "Frasier", "Winslow", "Crane", | 112 "Frasier", "Winslow", "Crane", |
| 113 "", "randomness", "", "Apt. 4", "Seattle", "WA", | 113 "", "randomness", "", "Apt. 4", "Seattle", "WA", |
| 114 "99121", "US", "0000000000", "ABCDEFGHIJK"); | 114 "99121", "US", "0000000000"); |
| 115 break; | 115 break; |
| 116 case PROFILE_NULL: | 116 case PROFILE_NULL: |
| 117 autofill_test::SetProfileInfoWithGuid(&profile, | 117 autofill_test::SetProfileInfoWithGuid(&profile, |
| 118 "FE461507-7E13-4198-8E66-74C7DB6D8322", | 118 "FE461507-7E13-4198-8E66-74C7DB6D8322", |
| 119 "", "", "", "", "", "", "", "", "", "", "", "", ""); | 119 "", "", "", "", "", "", "", "", "", "", "", ""); |
| 120 break; | 120 break; |
| 121 } | 121 } |
| 122 return profile; | 122 return profile; |
| 123 } | 123 } |
| 124 | 124 |
| 125 WebDataService* GetWebDataService(int index) { | 125 WebDataService* GetWebDataService(int index) { |
| 126 return test()->GetProfile(index)->GetWebDataService(Profile::EXPLICIT_ACCESS); | 126 return test()->GetProfile(index)->GetWebDataService(Profile::EXPLICIT_ACCESS); |
| 127 } | 127 } |
| 128 | 128 |
| 129 PersonalDataManager* GetPersonalDataManager(int index) { | 129 PersonalDataManager* GetPersonalDataManager(int index) { |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 if (!ProfilesMatch(0, i)) { | 289 if (!ProfilesMatch(0, i)) { |
| 290 LOG(ERROR) << "Profile " << i << "does not contain the same autofill " | 290 LOG(ERROR) << "Profile " << i << "does not contain the same autofill " |
| 291 "profiles as profile 0."; | 291 "profiles as profile 0."; |
| 292 return false; | 292 return false; |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 return true; | 295 return true; |
| 296 } | 296 } |
| 297 | 297 |
| 298 } // namespace autofill_helper | 298 } // namespace autofill_helper |
| OLD | NEW |