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

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

Issue 2542593003: HTTP Bad: Add a seperator between http warning message and other entries (Closed)
Patch Set: fix win trybots 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 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 l10n_util::GetStringUTF8(IDS_AUTOFILL_HTTP_WARNING_LEARN_MORE), 1632 l10n_util::GetStringUTF8(IDS_AUTOFILL_HTTP_WARNING_LEARN_MORE),
1633 "httpWarning", POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE), 1633 "httpWarning", POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE),
1634 #if !defined(OS_ANDROID)
1635 Suggestion("", "", "", POPUP_ITEM_ID_SEPARATOR),
1636 #endif
1634 Suggestion( 1637 Suggestion(
1635 l10n_util::GetStringUTF8(IDS_AUTOFILL_WARNING_INSECURE_CONNECTION), 1638 l10n_util::GetStringUTF8(IDS_AUTOFILL_WARNING_INSECURE_CONNECTION),
1636 "", "", POPUP_ITEM_ID_INSECURE_CONTEXT_PAYMENT_DISABLED_MESSAGE)); 1639 "", "", POPUP_ITEM_ID_INSECURE_CONTEXT_PAYMENT_DISABLED_MESSAGE));
1637 1640
1638 // Clear the test credit cards and try again -- we shouldn't return a warning. 1641 // Clear the test credit cards and try again -- we shouldn't return a warning.
1639 personal_data_.ClearCreditCards(); 1642 personal_data_.ClearCreditCards();
1640 GetAutofillSuggestions(form, field); 1643 GetAutofillSuggestions(form, field);
1641 // Autocomplete suggestions are queried, but not Autofill. 1644 // Autocomplete suggestions are queried, but not Autofill.
1642 EXPECT_FALSE(external_delegate_->on_suggestions_returned_seen()); 1645 EXPECT_FALSE(external_delegate_->on_suggestions_returned_seen());
1643 } 1646 }
(...skipping 3910 matching lines...) Expand 10 before | Expand all | Expand 10 after
5554 5557
5555 // The driver should always be notified. 5558 // The driver should always be notified.
5556 for (const FormFieldData& field : form.fields) { 5559 for (const FormFieldData& field : form.fields) {
5557 GetAutofillSuggestions(form, field); 5560 GetAutofillSuggestions(form, field);
5558 EXPECT_TRUE(autofill_driver_->did_interact_with_credit_card_form()); 5561 EXPECT_TRUE(autofill_driver_->did_interact_with_credit_card_form());
5559 autofill_driver_->ClearDidInteractWithCreditCardForm(); 5562 autofill_driver_->ClearDidInteractWithCreditCardForm();
5560 } 5563 }
5561 } 5564 }
5562 5565
5563 } // namespace autofill 5566 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698