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

Side by Side Diff: components/autofill/core/browser/phone_field_unittest.cc

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 years, 4 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
OLDNEW
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 "components/autofill/core/browser/phone_field.h" 5 #include "components/autofill/core/browser/phone_field.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 field.max_length = 0; 151 field.max_length = 0;
152 list_.push_back(new AutofillField(field, ASCIIToUTF16("ext4"))); 152 list_.push_back(new AutofillField(field, ASCIIToUTF16("ext4")));
153 153
154 AutofillScanner scanner(list_.get()); 154 AutofillScanner scanner(list_.get());
155 field_ = Parse(&scanner); 155 field_ = Parse(&scanner);
156 ASSERT_NE(nullptr, field_.get()); 156 ASSERT_NE(nullptr, field_.get());
157 field_->AddClassifications(&field_candidates_map_); 157 field_->AddClassifications(&field_candidates_map_);
158 CheckField("areacode1", PHONE_HOME_CITY_CODE); 158 CheckField("areacode1", PHONE_HOME_CITY_CODE);
159 CheckField("prefix2", PHONE_HOME_NUMBER); 159 CheckField("prefix2", PHONE_HOME_NUMBER);
160 CheckField("suffix3", PHONE_HOME_NUMBER); 160 CheckField("suffix3", PHONE_HOME_NUMBER);
161 EXPECT_TRUE(ContainsKey(field_candidates_map_, ASCIIToUTF16("ext4"))); 161 EXPECT_TRUE(base::ContainsKey(field_candidates_map_, ASCIIToUTF16("ext4")));
162 } 162 }
163 } 163 }
164 164
165 // This scenario of explicitly labeled "prefix" and "suffix" phone numbers 165 // This scenario of explicitly labeled "prefix" and "suffix" phone numbers
166 // encountered in http://crbug.com/40694 with page 166 // encountered in http://crbug.com/40694 with page
167 // https://www.wrapables.com/jsp/Signup.jsp. 167 // https://www.wrapables.com/jsp/Signup.jsp.
168 TEST_F(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix) { 168 TEST_F(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix) {
169 FormFieldData field; 169 FormFieldData field;
170 170
171 for (size_t i = 0; i < arraysize(kFieldTypes); ++i) { 171 for (size_t i = 0; i < arraysize(kFieldTypes); ++i) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 AutofillScanner scanner(list_.get()); 248 AutofillScanner scanner(list_.get());
249 field_ = Parse(&scanner); 249 field_ = Parse(&scanner);
250 ASSERT_NE(nullptr, field_.get()); 250 ASSERT_NE(nullptr, field_.get());
251 field_->AddClassifications(&field_candidates_map_); 251 field_->AddClassifications(&field_candidates_map_);
252 CheckField("country", PHONE_HOME_COUNTRY_CODE); 252 CheckField("country", PHONE_HOME_COUNTRY_CODE);
253 CheckField("phone", PHONE_HOME_CITY_AND_NUMBER); 253 CheckField("phone", PHONE_HOME_CITY_AND_NUMBER);
254 } 254 }
255 } 255 }
256 256
257 } // namespace autofill 257 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698