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 180b5d572042ecda872b2a2e601151bce17d20fe..77d853ef096a85d58a19e7bd5182b4b35f235787 100644 |
--- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc |
+++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc |
@@ -1110,6 +1110,7 @@ TEST_F(PasswordAutofillAgentTest, PreviewSuggestion) { |
// Tests that |PreviewSuggestion| properly sets the username selection range. |
TEST_F(PasswordAutofillAgentTest, PreviewSuggestionSelectionRange) { |
username_element_.setValue(WebString::fromUTF8("ali")); |
+ username_element_.setSelectionRange(3, 3); |
username_element_.setAutofilled(true); |
CheckTextFieldsDOMState("ali", true, std::string(), false); |
@@ -1165,6 +1166,7 @@ TEST_F(PasswordAutofillAgentTest, ClearPreviewWithPasswordAutofilled) { |
// with username being previously autofilled. |
TEST_F(PasswordAutofillAgentTest, ClearPreviewWithUsernameAutofilled) { |
username_element_.setValue(WebString::fromUTF8("ali")); |
+ username_element_.setSelectionRange(3, 3); |
username_element_.setAutofilled(true); |
// Simulate the browser sending the login info, but set |wait_for_username| |
@@ -1194,6 +1196,7 @@ TEST_F(PasswordAutofillAgentTest, ClearPreviewWithUsernameAutofilled) { |
TEST_F(PasswordAutofillAgentTest, |
ClearPreviewWithAutofilledUsernameAndPassword) { |
username_element_.setValue(WebString::fromUTF8("ali")); |
+ username_element_.setSelectionRange(3, 3); |
username_element_.setAutofilled(true); |
password_element_.setValue(WebString::fromUTF8("sec")); |
password_element_.setAutofilled(true); |