Index: chrome/browser/password_manager/password_manager_browsertest.cc |
diff --git a/chrome/browser/password_manager/password_manager_browsertest.cc b/chrome/browser/password_manager/password_manager_browsertest.cc |
index 892ac14147fc894dcd05946fc6e03163f499cc8c..7670572e74b42ff2db7e86bf7c20bf8420ad99ad 100644 |
--- a/chrome/browser/password_manager/password_manager_browsertest.cc |
+++ b/chrome/browser/password_manager/password_manager_browsertest.cc |
@@ -1189,6 +1189,24 @@ IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest, |
} |
IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest, |
+ DontPromptForPasswordFormWithReadonlyPasswordField) { |
+ NavigateToFile("/password/password_form_with_password_readonly.html"); |
+ |
+ // Fill a form and submit through a <input type="submit"> button. Nothing |
+ // special. |
+ NavigationObserver observer(WebContents()); |
+ scoped_ptr<PromptObserver> prompt_observer( |
+ PromptObserver::Create(WebContents())); |
+ std::string fill_and_submit = |
+ "document.getElementById('username_field').value = 'temp';" |
+ "document.getElementById('password_field').value = 'random';" |
+ "document.getElementById('input_submit_button').click()"; |
+ ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), fill_and_submit)); |
+ observer.Wait(); |
+ EXPECT_FALSE(prompt_observer->IsShowingPrompt()); |
+} |
+ |
+IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest, |
PromptWhenEnableAutomaticPasswordSavingSwitchIsNotSet) { |
NavigateToFile("/password/password_form.html"); |