Chromium Code Reviews| 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 144697576dc08a02b652506fad2912ddadcad399..363f6fea1e9b34410c58f937ff529ba08853e179 100644 |
| --- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc |
| +++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc |
| @@ -2894,4 +2894,16 @@ TEST_F(PasswordAutofillAgentTest, |
| EXPECT_EQ(2, fake_driver_.called_check_safe_browsing_reputation_cnt()); |
| } |
| #endif |
| + |
| +// Tests that the password login is autocompleted as expected when the browser |
| +// when JavaScript changes url. |
|
kolos1
2017/05/18 09:52:52
Didn't understand the comment.
dvadym
2017/05/18 11:08:52
Updated comments
|
| +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 |