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 <algorithm> | 5 #include <algorithm> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2819 // A profile already exists. | 2819 // A profile already exists. |
2820 EXPECT_FALSE( | 2820 EXPECT_FALSE( |
2821 autofill_manager_->ShouldShowAccessAddressBookSuggestion(form, field)); | 2821 autofill_manager_->ShouldShowAccessAddressBookSuggestion(form, field)); |
2822 | 2822 |
2823 // Remove all profiles. | 2823 // Remove all profiles. |
2824 personal_data_.ClearAutofillProfiles(); | 2824 personal_data_.ClearAutofillProfiles(); |
2825 EXPECT_TRUE( | 2825 EXPECT_TRUE( |
2826 autofill_manager_->ShouldShowAccessAddressBookSuggestion(form, field)); | 2826 autofill_manager_->ShouldShowAccessAddressBookSuggestion(form, field)); |
2827 | 2827 |
2828 field.should_autocomplete = false; | 2828 field.should_autocomplete = false; |
2829 EXPECT_FALSE( | 2829 EXPECT_TRUE( |
2830 autofill_manager_->ShouldShowAccessAddressBookSuggestion(form, field)); | 2830 autofill_manager_->ShouldShowAccessAddressBookSuggestion(form, field)); |
2831 } | 2831 } |
2832 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | 2832 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
2833 | 2833 |
2834 namespace { | 2834 namespace { |
2835 | 2835 |
2836 class MockAutofillClient : public TestAutofillClient { | 2836 class MockAutofillClient : public TestAutofillClient { |
2837 public: | 2837 public: |
2838 MockAutofillClient() {} | 2838 MockAutofillClient() {} |
2839 | 2839 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2926 // results. This triggers the combined message send. | 2926 // results. This triggers the combined message send. |
2927 AutocompleteSuggestionsReturned(std::vector<base::string16>()); | 2927 AutocompleteSuggestionsReturned(std::vector<base::string16>()); |
2928 | 2928 |
2929 external_delegate_->CheckSuggestions( | 2929 external_delegate_->CheckSuggestions( |
2930 kDefaultPageID, | 2930 kDefaultPageID, |
2931 Suggestion("Visa - 3456", "04/12", kVisaCard, | 2931 Suggestion("Visa - 3456", "04/12", kVisaCard, |
2932 autofill_manager_->GetPackedCreditCardID(4))); | 2932 autofill_manager_->GetPackedCreditCardID(4))); |
2933 } | 2933 } |
2934 | 2934 |
2935 } // namespace autofill | 2935 } // namespace autofill |
OLD | NEW |