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

Side by Side Diff: components/autofill/core/browser/autofill_manager_unittest.cc

Issue 864873002: Autofill - don't respect autocomplete="off" for mac address book or (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac test expectation Created 5 years, 11 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
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698