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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/guid.h" |
6 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
7 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
8 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
9 #include "base/string16.h" | 10 #include "base/string16.h" |
10 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/autofill/autofill_common_test.h" | 12 #include "chrome/browser/autofill/autofill_common_test.h" |
12 #include "chrome/browser/autofill/autofill_profile.h" | 13 #include "chrome/browser/autofill/autofill_profile.h" |
13 #include "chrome/common/guid.h" | |
14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 bool UpdateProfileLabel(AutofillProfile *profile) { | 19 bool UpdateProfileLabel(AutofillProfile *profile) { |
20 std::vector<AutofillProfile*> profiles; | 20 std::vector<AutofillProfile*> profiles; |
21 profiles.push_back(profile); | 21 profiles.push_back(profile); |
22 return AutofillProfile::AdjustInferredLabels(&profiles); | 22 return AutofillProfile::AdjustInferredLabels(&profiles); |
23 } | 23 } |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 // Delete values. | 706 // Delete values. |
707 set_values.clear(); | 707 set_values.clear(); |
708 p.SetMultiInfo(PHONE_HOME_WHOLE_NUMBER, set_values); | 708 p.SetMultiInfo(PHONE_HOME_WHOLE_NUMBER, set_values); |
709 p.GetMultiInfo(PHONE_HOME_WHOLE_NUMBER, &get_values); | 709 p.GetMultiInfo(PHONE_HOME_WHOLE_NUMBER, &get_values); |
710 ASSERT_EQ(1UL, get_values.size()); | 710 ASSERT_EQ(1UL, get_values.size()); |
711 EXPECT_EQ(string16(), get_values[0]); | 711 EXPECT_EQ(string16(), get_values[0]); |
712 | 712 |
713 // Expect regular |GetInfo| returns empty value. | 713 // Expect regular |GetInfo| returns empty value. |
714 EXPECT_EQ(string16(), p.GetInfo(PHONE_HOME_WHOLE_NUMBER)); | 714 EXPECT_EQ(string16(), p.GetInfo(PHONE_HOME_WHOLE_NUMBER)); |
715 } | 715 } |
OLD | NEW |