OLD | NEW |
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 <algorithm> | 5 #include <algorithm> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.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 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2075 | 2075 |
2076 test::CreateTestFormField("", "firstname", "", "text", &field); | 2076 test::CreateTestFormField("", "firstname", "", "text", &field); |
2077 field.autocomplete_attribute = "given-name"; | 2077 field.autocomplete_attribute = "given-name"; |
2078 form.fields.push_back(field); | 2078 form.fields.push_back(field); |
2079 | 2079 |
2080 test::CreateTestFormField("", "lastname", "", "text", &field); | 2080 test::CreateTestFormField("", "lastname", "", "text", &field); |
2081 field.autocomplete_attribute = "family-name"; | 2081 field.autocomplete_attribute = "family-name"; |
2082 form.fields.push_back(field); | 2082 form.fields.push_back(field); |
2083 | 2083 |
2084 test::CreateTestFormField("", "address", "", "text", &field); | 2084 test::CreateTestFormField("", "address", "", "text", &field); |
2085 field.autocomplete_attribute = "section-billing street-address"; | 2085 field.autocomplete_attribute = "section-billing address-line1"; |
2086 form.fields.push_back(field); | 2086 form.fields.push_back(field); |
2087 | 2087 |
2088 test::CreateTestFormField("", "city", "", "text", &field); | 2088 test::CreateTestFormField("", "city", "", "text", &field); |
2089 field.autocomplete_attribute = "section-billing locality"; | 2089 field.autocomplete_attribute = "section-billing locality"; |
2090 form.fields.push_back(field); | 2090 form.fields.push_back(field); |
2091 | 2091 |
2092 test::CreateTestFormField("", "state", "", "text", &field); | 2092 test::CreateTestFormField("", "state", "", "text", &field); |
2093 field.autocomplete_attribute = "section-billing region"; | 2093 field.autocomplete_attribute = "section-billing region"; |
2094 form.fields.push_back(field); | 2094 form.fields.push_back(field); |
2095 | 2095 |
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3267 forms.push_back(user_supplied); | 3267 forms.push_back(user_supplied); |
3268 | 3268 |
3269 // FormStructure should contain the same forms as before. | 3269 // FormStructure should contain the same forms as before. |
3270 DynamicFormsSeen(forms); | 3270 DynamicFormsSeen(forms); |
3271 form_structures = autofill_manager_->GetFormStructures(); | 3271 form_structures = autofill_manager_->GetFormStructures(); |
3272 ASSERT_EQ(1U, form_structures.size()); | 3272 ASSERT_EQ(1U, form_structures.size()); |
3273 EXPECT_EQ("/form.html", form_structures[0]->source_url().path()); | 3273 EXPECT_EQ("/form.html", form_structures[0]->source_url().path()); |
3274 } | 3274 } |
3275 | 3275 |
3276 } // namespace autofill | 3276 } // namespace autofill |
OLD | NEW |