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

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

Issue 2498503002: Http Bad: Add icons to the http warning message (Closed)
Patch Set: rebase Created 4 years 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
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 "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
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 "", "", POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE), 1632 "", "httpWarning",
1633 POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE),
1633 Suggestion( 1634 Suggestion(
1634 l10n_util::GetStringUTF8(IDS_AUTOFILL_WARNING_INSECURE_CONNECTION), 1635 l10n_util::GetStringUTF8(IDS_AUTOFILL_WARNING_INSECURE_CONNECTION),
1635 "", "", POPUP_ITEM_ID_INSECURE_CONTEXT_PAYMENT_DISABLED_MESSAGE)); 1636 "", "", POPUP_ITEM_ID_INSECURE_CONTEXT_PAYMENT_DISABLED_MESSAGE));
1636 1637
1637 // Clear the test credit cards and try again -- we shouldn't return a warning. 1638 // Clear the test credit cards and try again -- we shouldn't return a warning.
1638 personal_data_.ClearCreditCards(); 1639 personal_data_.ClearCreditCards();
1639 GetAutofillSuggestions(form, field); 1640 GetAutofillSuggestions(form, field);
1640 // Autocomplete suggestions are queried, but not Autofill. 1641 // Autocomplete suggestions are queried, but not Autofill.
1641 EXPECT_FALSE(external_delegate_->on_suggestions_returned_seen()); 1642 EXPECT_FALSE(external_delegate_->on_suggestions_returned_seen());
1642 } 1643 }
(...skipping 3910 matching lines...) Expand 10 before | Expand all | Expand 10 after
5553 5554
5554 // The driver should always be notified. 5555 // The driver should always be notified.
5555 for (const FormFieldData& field : form.fields) { 5556 for (const FormFieldData& field : form.fields) {
5556 GetAutofillSuggestions(form, field); 5557 GetAutofillSuggestions(form, field);
5557 EXPECT_TRUE(autofill_driver_->did_interact_with_credit_card_form()); 5558 EXPECT_TRUE(autofill_driver_->did_interact_with_credit_card_form());
5558 autofill_driver_->ClearDidInteractWithCreditCardForm(); 5559 autofill_driver_->ClearDidInteractWithCreditCardForm();
5559 } 5560 }
5560 } 5561 }
5561 5562
5562 } // namespace autofill 5563 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698