| 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 ccd18184dc361d0504ba0b4b111b102072b4ca29..f6d1a25446a6be6efba8edb24495bb3c9931251c 100644
|
| --- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
|
| +++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
|
| @@ -2913,4 +2913,16 @@ TEST_F(PasswordAutofillAgentTest,
|
| EXPECT_EQ(2, fake_driver_.called_check_safe_browsing_reputation_cnt());
|
| }
|
| #endif
|
| +
|
| +// Tests that username/password are autofilled when JavaScript is changing url
|
| +// between discovering a form and receving credentials from the browser process.
|
| +TEST_F(PasswordAutofillAgentTest, AutocompleteWhenPageUrlIsChanged) {
|
| + // Simulate that JavaScript changes url.
|
| + fill_data_.origin = GURL(fill_data_.origin.possibly_invalid_spec() + "/path");
|
| +
|
| + SimulateOnFillPasswordForm(fill_data_);
|
| +
|
| + // The username and password should have been autocompleted.
|
| + CheckTextFieldsState(kAliceUsername, true, kAlicePassword, true);
|
| +}
|
| } // namespace autofill
|
|
|