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

Unified Diff: components/autofill/content/browser/autofill_driver_impl_unittest.cc

Issue 79103002: Abstracted AcceptPasswordAutofillSuggestion IPC out of core Autofill code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes. Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/content/browser/autofill_driver_impl_unittest.cc
diff --git a/components/autofill/content/browser/autofill_driver_impl_unittest.cc b/components/autofill/content/browser/autofill_driver_impl_unittest.cc
index 0785c401a773ce4478aae367519d681906f5cf4b..a4651e28958c3f2bf3d11d15e29f98806bb7adf5 100644
--- a/components/autofill/content/browser/autofill_driver_impl_unittest.cc
+++ b/components/autofill/content/browser/autofill_driver_impl_unittest.cc
@@ -142,6 +142,11 @@ class AutofillDriverImplTest : public ChromeRenderViewHostTestHarness {
case AutofillMsg_AcceptDataListSuggestion::ID:
AutofillMsg_AcceptDataListSuggestion::Read(message, &autofill_param);
break;
+ case AutofillMsg_AcceptPasswordAutofillSuggestion::ID:
+ AutofillMsg_AcceptPasswordAutofillSuggestion::Read(
+ message,
+ &autofill_param);
+ break;
default:
NOTREACHED();
}
@@ -256,6 +261,16 @@ TEST_F(AutofillDriverImplTest, AcceptDataListSuggestion) {
EXPECT_EQ(input_value, output_value);
}
+TEST_F(AutofillDriverImplTest, AcceptPasswordAutofillSuggestion) {
+ base::string16 input_value(ASCIIToUTF16("barbaz"));
+ base::string16 output_value;
+ driver_->RendererShouldAcceptPasswordAutofillSuggestion(input_value);
+ EXPECT_TRUE(GetString16FromMessageWithID(
+ AutofillMsg_AcceptPasswordAutofillSuggestion::ID,
+ &output_value));
+ EXPECT_EQ(input_value, output_value);
+}
+
TEST_F(AutofillDriverImplTest, ClearFilledFormSentToRenderer) {
driver_->RendererShouldClearFilledForm();
EXPECT_TRUE(HasMessageMatchingID(AutofillMsg_ClearForm::ID));
« no previous file with comments | « components/autofill/content/browser/autofill_driver_impl.cc ('k') | components/autofill/content/renderer/autofill_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698