OLD | NEW |
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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/guid.h" | 9 #include "base/guid.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 2657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2668 &icons, | 2668 &icons, |
2669 &guid_pairs); | 2669 &guid_pairs); |
2670 ASSERT_EQ(2U, values.size()); | 2670 ASSERT_EQ(2U, values.size()); |
2671 ASSERT_EQ(values.size(), labels.size()); | 2671 ASSERT_EQ(values.size(), labels.size()); |
2672 EXPECT_EQ(ASCIIToUTF16("********8555"), values[0]); | 2672 EXPECT_EQ(ASCIIToUTF16("********8555"), values[0]); |
2673 EXPECT_EQ(ASCIIToUTF16("04/15"), labels[0]); | 2673 EXPECT_EQ(ASCIIToUTF16("04/15"), labels[0]); |
2674 EXPECT_EQ(ASCIIToUTF16("********2109"), values[1]); | 2674 EXPECT_EQ(ASCIIToUTF16("********2109"), values[1]); |
2675 EXPECT_EQ(base::string16(), labels[1]); | 2675 EXPECT_EQ(base::string16(), labels[1]); |
2676 } | 2676 } |
2677 | 2677 |
| 2678 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 2679 TEST_F(PersonalDataManagerTest, ShowAddressBookPrompt) { |
| 2680 EXPECT_CALL(personal_data_observer_, OnPersonalDataChanged()).Times(2); |
| 2681 |
| 2682 AutofillType type(ADDRESS_HOME_STREET_ADDRESS); |
| 2683 |
| 2684 prefs_->SetBoolean(prefs::kAutofillEnabled, true); |
| 2685 EXPECT_TRUE(personal_data_->ShouldShowAccessAddressBookSuggestion(type)); |
| 2686 |
| 2687 prefs_->SetBoolean(prefs::kAutofillEnabled, false); |
| 2688 EXPECT_FALSE(personal_data_->ShouldShowAccessAddressBookSuggestion(type)); |
| 2689 } |
| 2690 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 2691 |
2678 } // namespace autofill | 2692 } // namespace autofill |
OLD | NEW |