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

Side by Side Diff: components/autofill/browser/autofill_profile_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
OLDNEW
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/guid.h" 6 #include "base/guid.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "base/stringprintf.h" 11 #include "base/stringprintf.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "chrome/browser/autofill/autofill_common_test.h" 13 #include "components/autofill/browser/autofill_common_test.h"
14 #include "chrome/browser/autofill/autofill_profile.h" 14 #include "components/autofill/browser/autofill_profile.h"
15 #include "components/autofill/common/form_field_data.h" 15 #include "components/autofill/common/form_field_data.h"
16 #include "grit/generated_resources.h" 16 #include "grit/generated_resources.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 namespace { 19 namespace {
20 20
21 bool UpdateProfileLabel(AutofillProfile *profile) { 21 bool UpdateProfileLabel(AutofillProfile *profile) {
22 std::vector<AutofillProfile*> profiles; 22 std::vector<AutofillProfile*> profiles;
23 profiles.push_back(profile); 23 profiles.push_back(profile);
24 return AutofillProfile::AdjustInferredLabels(&profiles); 24 return AutofillProfile::AdjustInferredLabels(&profiles);
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 FormFieldData field; 839 FormFieldData field;
840 field.form_control_type = "select-one"; 840 field.form_control_type = "select-one";
841 field.option_values = values; 841 field.option_values = values;
842 field.option_contents = contents; 842 field.option_contents = contents;
843 843
844 AutofillProfile profile; 844 AutofillProfile profile;
845 profile.SetRawInfo(ADDRESS_HOME_STATE, ASCIIToUTF16("California")); 845 profile.SetRawInfo(ADDRESS_HOME_STATE, ASCIIToUTF16("California"));
846 profile.FillSelectControl(ADDRESS_HOME_STATE, &field); 846 profile.FillSelectControl(ADDRESS_HOME_STATE, &field);
847 EXPECT_EQ(ASCIIToUTF16("2"), field.value); 847 EXPECT_EQ(ASCIIToUTF16("2"), field.value);
848 } 848 }
OLDNEW
« no previous file with comments | « components/autofill/browser/autofill_profile.cc ('k') | components/autofill/browser/autofill_regex_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698