| OLD | NEW |
| 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/browser/autofill/autofill_common_test.h" | 11 #include "chrome/browser/autofill/autofill_common_test.h" |
| 12 #include "chrome/browser/autofill/autofill_profile.h" | 12 #include "chrome/browser/autofill/autofill_profile.h" |
| 13 #include "chrome/common/guid.h" | 13 #include "chrome/common/guid.h" |
| 14 #include "chrome/test/testing_browser_process_test.h" | 14 #include "chrome/test/base/testing_browser_process_test.h" |
| 15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 bool UpdateProfileLabel(AutofillProfile *profile) { | 20 bool UpdateProfileLabel(AutofillProfile *profile) { |
| 21 std::vector<AutofillProfile*> profiles; | 21 std::vector<AutofillProfile*> profiles; |
| 22 profiles.push_back(profile); | 22 profiles.push_back(profile); |
| 23 return AutofillProfile::AdjustInferredLabels(&profiles); | 23 return AutofillProfile::AdjustInferredLabels(&profiles); |
| 24 } | 24 } |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 // Delete values. | 822 // Delete values. |
| 823 set_values.clear(); | 823 set_values.clear(); |
| 824 p.SetMultiInfo(PHONE_FAX_WHOLE_NUMBER, set_values); | 824 p.SetMultiInfo(PHONE_FAX_WHOLE_NUMBER, set_values); |
| 825 p.GetMultiInfo(PHONE_FAX_WHOLE_NUMBER, &get_values); | 825 p.GetMultiInfo(PHONE_FAX_WHOLE_NUMBER, &get_values); |
| 826 ASSERT_EQ(1UL, get_values.size()); | 826 ASSERT_EQ(1UL, get_values.size()); |
| 827 EXPECT_EQ(string16(), get_values[0]); | 827 EXPECT_EQ(string16(), get_values[0]); |
| 828 | 828 |
| 829 // Expect regular |GetInfo| returns empty value. | 829 // Expect regular |GetInfo| returns empty value. |
| 830 EXPECT_EQ(string16(), p.GetInfo(PHONE_FAX_WHOLE_NUMBER)); | 830 EXPECT_EQ(string16(), p.GetInfo(PHONE_FAX_WHOLE_NUMBER)); |
| 831 } | 831 } |
| OLD | NEW |