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 "components/autofill/core/browser/autofill_manager.h" | 5 #include "components/autofill/core/browser/autofill_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1622 FormsSeen(forms); | 1622 FormsSeen(forms); |
1623 | 1623 |
1624 const FormFieldData& field = form.fields[0]; | 1624 const FormFieldData& field = form.fields[0]; |
1625 GetAutofillSuggestions(form, field); | 1625 GetAutofillSuggestions(form, field); |
1626 | 1626 |
1627 // Test that we sent the right values to the external delegate. | 1627 // Test that we sent the right values to the external delegate. |
1628 external_delegate_->CheckSuggestions( | 1628 external_delegate_->CheckSuggestions( |
1629 kDefaultPageID, | 1629 kDefaultPageID, |
1630 Suggestion(l10n_util::GetStringUTF8( | 1630 Suggestion(l10n_util::GetStringUTF8( |
1631 IDS_AUTOFILL_CREDIT_CARD_HTTP_WARNING_MESSAGE), | 1631 IDS_AUTOFILL_CREDIT_CARD_HTTP_WARNING_MESSAGE), |
1632 "", "", -1), | 1632 "", "", -10), |
Mathieu
2016/11/12 12:52:05
let's use proper popup_item_ids values.
lshang
2016/11/14 10:51:01
Done.
| |
1633 Suggestion( | 1633 Suggestion( |
1634 l10n_util::GetStringUTF8(IDS_AUTOFILL_WARNING_INSECURE_CONNECTION), | 1634 l10n_util::GetStringUTF8(IDS_AUTOFILL_WARNING_INSECURE_CONNECTION), |
1635 "", "", -1)); | 1635 "", "", -1)); |
1636 | 1636 |
1637 // Clear the test credit cards and try again -- we shouldn't return a warning. | 1637 // Clear the test credit cards and try again -- we shouldn't return a warning. |
1638 personal_data_.ClearCreditCards(); | 1638 personal_data_.ClearCreditCards(); |
1639 GetAutofillSuggestions(form, field); | 1639 GetAutofillSuggestions(form, field); |
1640 // Autocomplete suggestions are queried, but not Autofill. | 1640 // Autocomplete suggestions are queried, but not Autofill. |
1641 EXPECT_FALSE(external_delegate_->on_suggestions_returned_seen()); | 1641 EXPECT_FALSE(external_delegate_->on_suggestions_returned_seen()); |
1642 } | 1642 } |
(...skipping 3817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5460 | 5460 |
5461 // The driver should always be notified. | 5461 // The driver should always be notified. |
5462 for (const FormFieldData& field : form.fields) { | 5462 for (const FormFieldData& field : form.fields) { |
5463 GetAutofillSuggestions(form, field); | 5463 GetAutofillSuggestions(form, field); |
5464 EXPECT_TRUE(autofill_driver_->did_interact_with_credit_card_form()); | 5464 EXPECT_TRUE(autofill_driver_->did_interact_with_credit_card_form()); |
5465 autofill_driver_->ClearDidInteractWithCreditCardForm(); | 5465 autofill_driver_->ClearDidInteractWithCreditCardForm(); |
5466 } | 5466 } |
5467 } | 5467 } |
5468 | 5468 |
5469 } // namespace autofill | 5469 } // namespace autofill |
OLD | NEW |