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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 119 |
120 MOCK_METHOD1(SaveImportedCreditCard, | 120 MOCK_METHOD1(SaveImportedCreditCard, |
121 void(const CreditCard& imported_credit_card)); | 121 void(const CreditCard& imported_credit_card)); |
122 | 122 |
123 private: | 123 private: |
124 void CreateTestAutofillProfiles(ScopedVector<AutofillProfile>* profiles) { | 124 void CreateTestAutofillProfiles(ScopedVector<AutofillProfile>* profiles) { |
125 AutofillProfile* profile = new AutofillProfile; | 125 AutofillProfile* profile = new AutofillProfile; |
126 autofill_test::SetProfileInfo(profile, "Elvis", "Aaron", | 126 autofill_test::SetProfileInfo(profile, "Elvis", "Aaron", |
127 "Presley", "theking@gmail.com", "RCA", | 127 "Presley", "theking@gmail.com", "RCA", |
128 "3734 Elvis Presley Blvd.", "Apt. 10", | 128 "3734 Elvis Presley Blvd.", "Apt. 10", |
129 "Memphis", "Tennessee", "38116", "USA", | 129 "Memphis", "Tennessee", "38116", "US", |
130 "12345678901"); | 130 "12345678901"); |
131 profile->set_guid("00000000-0000-0000-0000-000000000001"); | 131 profile->set_guid("00000000-0000-0000-0000-000000000001"); |
132 profiles->push_back(profile); | 132 profiles->push_back(profile); |
133 profile = new AutofillProfile; | 133 profile = new AutofillProfile; |
134 autofill_test::SetProfileInfo(profile, "Charles", "Hardin", | 134 autofill_test::SetProfileInfo(profile, "Charles", "Hardin", |
135 "Holley", "buddy@gmail.com", "Decca", | 135 "Holley", "buddy@gmail.com", "Decca", |
136 "123 Apple St.", "unit 6", "Lubbock", | 136 "123 Apple St.", "unit 6", "Lubbock", |
137 "Texas", "79401", "USA", "2345678901"); | 137 "Texas", "79401", "US", "2345678901"); |
138 profile->set_guid("00000000-0000-0000-0000-000000000002"); | 138 profile->set_guid("00000000-0000-0000-0000-000000000002"); |
139 profiles->push_back(profile); | 139 profiles->push_back(profile); |
140 } | 140 } |
141 | 141 |
142 bool autofill_enabled_; | 142 bool autofill_enabled_; |
143 | 143 |
144 DISALLOW_COPY_AND_ASSIGN(TestPersonalDataManager); | 144 DISALLOW_COPY_AND_ASSIGN(TestPersonalDataManager); |
145 }; | 145 }; |
146 | 146 |
147 class TestFormStructure : public FormStructure { | 147 class TestFormStructure : public FormStructure { |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 autofill_manager_->OnFormsSeen(forms, TimeTicks::FromInternalValue(1)); | 1560 autofill_manager_->OnFormsSeen(forms, TimeTicks::FromInternalValue(1)); |
1561 autofill_manager_->OnDidFillAutofillFormData( | 1561 autofill_manager_->OnDidFillAutofillFormData( |
1562 TimeTicks::FromInternalValue(5)); | 1562 TimeTicks::FromInternalValue(5)); |
1563 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), | 1563 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), |
1564 TimeTicks::FromInternalValue(3)); | 1564 TimeTicks::FromInternalValue(3)); |
1565 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17)); | 1565 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17)); |
1566 autofill_manager_->Reset(); | 1566 autofill_manager_->Reset(); |
1567 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); | 1567 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); |
1568 } | 1568 } |
1569 } | 1569 } |
OLD | NEW |