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

Unified Diff: components/password_manager/core/browser/password_form_manager_unittest.cc

Issue 2687683002: [Password Manager] Fix sending votes for password generation. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/password_manager/core/browser/password_form_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/password_form_manager_unittest.cc
diff --git a/components/password_manager/core/browser/password_form_manager_unittest.cc b/components/password_manager/core/browser/password_form_manager_unittest.cc
index be93b4902a07e7a81e5ecc359c324ceaeb6077d3..4676a6c652d1ad8578a983ef586b7dba26fd0baa 100644
--- a/components/password_manager/core/browser/password_form_manager_unittest.cc
+++ b/components/password_manager/core/browser/password_form_manager_unittest.cc
@@ -458,6 +458,8 @@ class PasswordFormManagerTest : public testing::Test {
field.name = ASCIIToUTF16("NewPasswd");
field.form_control_type = "password";
observed_form()->form_data.fields.push_back(field);
+ autofill::FormFieldData empty_field;
+ observed_form()->form_data.fields.push_back(empty_field);
if (has_confirmation_field) {
field.label = ASCIIToUTF16("ConfPwd");
field.name = ASCIIToUTF16("ConfPwd");
@@ -500,6 +502,7 @@ class PasswordFormManagerTest : public testing::Test {
expected_types[observed_form_.username_element] = autofill::UNKNOWN_TYPE;
expected_types[observed_form_.password_element] = autofill::PASSWORD;
expected_types[observed_form_.new_password_element] = field_type;
+ expected_types[base::string16()] = autofill::UNKNOWN_TYPE;
autofill::ServerFieldTypeSet expected_available_field_types;
expected_available_field_types.insert(autofill::PASSWORD);
@@ -2801,6 +2804,8 @@ TEST_F(PasswordFormManagerTest, ReportProcessingUpdate) {
pending, PasswordFormManager::IGNORE_OTHER_POSSIBLE_USERNAMES);
EXPECT_FALSE(form_manager()->IsNewLogin());
+ EXPECT_CALL(*client()->mock_driver()->mock_autofill_download_manager(),
+ StartUploadRequest(_, false, _, _, true));
dvadym 2017/02/08 14:38:48 This is not directly related to this CL. This meth
base::UserActionTester tester;
EXPECT_EQ(0, tester.GetActionCount("PasswordManager_LoginFollowingAutofill"));
« no previous file with comments | « components/password_manager/core/browser/password_form_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698