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 |