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 f0a766f8a1ffc5f005168db5200bd4e9e1fd6b2d..ae0d1bf10b8dca53bf5fdd612069827ebaa7920e 100644 |
--- a/chrome/browser/password_manager/password_manager_browsertest.cc |
+++ b/chrome/browser/password_manager/password_manager_browsertest.cc |
@@ -871,6 +871,24 @@ IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest, |
EXPECT_FALSE(prompt_observer->IsShowingPrompt()); |
} |
+IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest, |
+ NoPromptForLandingPageWithHTTPErrorStatusCode) { |
+ // Check that no prompt is shown for forms where the landing page has |
+ // HTTP status 404. |
+ NavigateToFile("/password/password_form.html"); |
+ |
+ NavigationObserver observer(WebContents()); |
+ scoped_ptr<PromptObserver> prompt_observer( |
+ PromptObserver::Create(WebContents())); |
+ std::string fill_and_submit = |
+ "document.getElementById('username_field_http_error').value = 'temp';" |
+ "document.getElementById('password_field_http_error').value = 'random';" |
+ "document.getElementById('input_submit_button_http_error').click()"; |
+ ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), fill_and_submit)); |
+ observer.Wait(); |
+ EXPECT_FALSE(prompt_observer->IsShowingPrompt()); |
+} |
+ |
IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest, DeleteFrameBeforeSubmit) { |
NavigateToFile("/password/multi_frames.html"); |