| 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 f6d1a25446a6be6efba8edb24495bb3c9931251c..37621b9bd544024d17147b5698396edaa4a70352 100644
|
| --- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
|
| +++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
|
| @@ -694,6 +694,19 @@ TEST_F(PasswordAutofillAgentTest,
|
| UTF16ToUTF8(password3_), true);
|
| }
|
|
|
| +// Fill a password field if the stored username is a prefix of username in
|
| +// read-only field.
|
| +TEST_F(PasswordAutofillAgentTest,
|
| + AutocompletePasswordForReadonlyUsernamePrefixMatched) {
|
| + base::string16 username_at = username3_ + base::UTF8ToUTF16("@example.com");
|
| + username_element_.SetValue(WebString::FromUTF16(username3_));
|
| + SetElementReadOnly(username_element_, true);
|
| +
|
| + // Filled even though username is not the preferred match.
|
| + SimulateOnFillPasswordForm(fill_data_);
|
| + CheckTextFieldsState(UTF16ToUTF8(username3_), false, UTF16ToUTF8(password3_),
|
| + true);
|
| +}
|
| // If a username field is empty and readonly, don't autofill.
|
| TEST_F(PasswordAutofillAgentTest,
|
| NoAutocompletePasswordForReadonlyUsernameUnmatched) {
|
|
|