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

Unified Diff: chrome/renderer/autofill/password_autofill_agent_browsertest.cc

Issue 2187253002: [Password Manager] Change signature of PasswordAutofillAgent.FillSuggestion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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 | « no previous file | components/autofill/content/renderer/password_autofill_agent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/password_autofill_agent_browsertest.cc
diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
index b5fb7b13f9675f164be8ab64c7e786fb6ecdb700..7cb509d8ac784362bd42f779b701eaea52ff8314 100644
--- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
+++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
@@ -998,13 +998,15 @@ TEST_F(PasswordAutofillAgentTest, FillSuggestion) {
// If the password field is not autocompletable, it should not be affected.
SetElementReadOnly(password_element_, true);
EXPECT_FALSE(password_autofill_agent_->FillSuggestion(
- username_element_, kAliceUsername, kAlicePassword));
+ username_element_, ASCIIToUTF16(kAliceUsername),
+ ASCIIToUTF16(kAlicePassword)));
CheckTextFieldsDOMState(std::string(), false, std::string(), false);
SetElementReadOnly(password_element_, false);
// After filling with the suggestion, both fields should be autocompleted.
EXPECT_TRUE(password_autofill_agent_->FillSuggestion(
- username_element_, kAliceUsername, kAlicePassword));
+ username_element_, ASCIIToUTF16(kAliceUsername),
+ ASCIIToUTF16(kAlicePassword)));
CheckTextFieldsDOMState(kAliceUsername, true, kAlicePassword, true);
int username_length = strlen(kAliceUsername);
CheckUsernameSelection(username_length, username_length);
@@ -1012,7 +1014,8 @@ TEST_F(PasswordAutofillAgentTest, FillSuggestion) {
// Try Filling with a suggestion with password different from the one that was
// initially sent to the renderer.
EXPECT_TRUE(password_autofill_agent_->FillSuggestion(
- username_element_, kBobUsername, kCarolPassword));
+ username_element_, ASCIIToUTF16(kBobUsername),
+ ASCIIToUTF16(kCarolPassword)));
CheckTextFieldsDOMState(kBobUsername, true, kCarolPassword, true);
username_length = strlen(kBobUsername);
CheckUsernameSelection(username_length, username_length);
@@ -1985,7 +1988,8 @@ TEST_F(PasswordAutofillAgentTest, FillSuggestionPasswordChangeForms) {
CheckTextFieldsDOMState(std::string(), false, std::string(), false);
EXPECT_TRUE(password_autofill_agent_->FillSuggestion(
- username_element_, kAliceUsername, kAlicePassword));
+ username_element_, ASCIIToUTF16(kAliceUsername),
+ ASCIIToUTF16(kAlicePassword)));
CheckTextFieldsDOMState(kAliceUsername, true, kAlicePassword, true);
}
@@ -2006,7 +2010,8 @@ TEST_F(PasswordAutofillAgentTest,
CheckTextFieldsDOMState(std::string(), false, std::string(), false);
EXPECT_TRUE(password_autofill_agent_->FillSuggestion(
- password_element_, kAliceUsername, kAlicePassword));
+ password_element_, ASCIIToUTF16(kAliceUsername),
+ ASCIIToUTF16(kAlicePassword)));
CheckTextFieldsDOMState("", false, kAlicePassword, true);
}
@@ -2419,7 +2424,8 @@ TEST_F(PasswordAutofillAgentTest, SuggestMultiplePasswordFields) {
// The user chooses to autofill the current password field.
EXPECT_TRUE(password_autofill_agent_->FillSuggestion(
- password_element_, kAliceUsername, kAlicePassword));
+ password_element_, ASCIIToUTF16(kAliceUsername),
+ ASCIIToUTF16(kAlicePassword)));
// Simulate a user clicking on not autofilled password fields. This should
// produce
« no previous file with comments | « no previous file | components/autofill/content/renderer/password_autofill_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698