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

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

Issue 12434004: Move remaining Autofill code to //components/autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix long lines Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « components/autofill/browser/phone_field.cc ('k') | components/autofill/browser/phone_number.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/memory/scoped_vector.h" 6 #include "base/memory/scoped_vector.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/autofill/autofill_field.h" 8 #include "components/autofill/browser/autofill_field.h"
9 #include "chrome/browser/autofill/autofill_scanner.h" 9 #include "components/autofill/browser/autofill_scanner.h"
10 #include "chrome/browser/autofill/phone_field.h" 10 #include "components/autofill/browser/phone_field.h"
11 #include "components/autofill/common/form_field_data.h" 11 #include "components/autofill/common/form_field_data.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 class PhoneFieldTest : public testing::Test { 14 class PhoneFieldTest : public testing::Test {
15 public: 15 public:
16 PhoneFieldTest() {} 16 PhoneFieldTest() {}
17 17
18 protected: 18 protected:
19 ScopedVector<const AutofillField> list_; 19 ScopedVector<const AutofillField> list_;
20 scoped_ptr<PhoneField> field_; 20 scoped_ptr<PhoneField> field_;
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 field_.reset(Parse(&scanner)); 217 field_.reset(Parse(&scanner));
218 ASSERT_NE(static_cast<PhoneField*>(NULL), field_.get()); 218 ASSERT_NE(static_cast<PhoneField*>(NULL), field_.get());
219 ASSERT_TRUE(field_->ClassifyField(&field_type_map_)); 219 ASSERT_TRUE(field_->ClassifyField(&field_type_map_));
220 ASSERT_TRUE( 220 ASSERT_TRUE(
221 field_type_map_.find(ASCIIToUTF16("country")) != field_type_map_.end()); 221 field_type_map_.find(ASCIIToUTF16("country")) != field_type_map_.end());
222 EXPECT_EQ(PHONE_HOME_COUNTRY_CODE, field_type_map_[ASCIIToUTF16("country")]); 222 EXPECT_EQ(PHONE_HOME_COUNTRY_CODE, field_type_map_[ASCIIToUTF16("country")]);
223 ASSERT_TRUE( 223 ASSERT_TRUE(
224 field_type_map_.find(ASCIIToUTF16("phone")) != field_type_map_.end()); 224 field_type_map_.find(ASCIIToUTF16("phone")) != field_type_map_.end());
225 EXPECT_EQ(PHONE_HOME_CITY_AND_NUMBER, field_type_map_[ASCIIToUTF16("phone")]); 225 EXPECT_EQ(PHONE_HOME_CITY_AND_NUMBER, field_type_map_[ASCIIToUTF16("phone")]);
226 } 226 }
OLDNEW
« no previous file with comments | « components/autofill/browser/phone_field.cc ('k') | components/autofill/browser/phone_number.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698