Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2235)

Unified Diff: chrome/browser/password_manager/password_manager_browsertest.cc

Issue 488083002: [Password Manager] Fix to recognise failed login attempt for sites where content server pushes new … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@branch_autofill_todo_20140813
Patch Set: Incorporated review comments and added browser_tests. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 ff2fdce0752d755b429a627bf7849d5eefca5d20..2bf9ae85e4657fc6c9d8841d122341acaa710083 100644
--- a/chrome/browser/password_manager/password_manager_browsertest.cc
+++ b/chrome/browser/password_manager/password_manager_browsertest.cc
@@ -1119,3 +1119,22 @@ IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest,
EXPECT_TRUE(prompt_observer->IsShowingPrompt());
}
+// Test that if login fails and content server pushes a different login form
+// with action URL having different scheme and/or case. Heuristic shall be able
vabr (Chromium) 2014/08/21 14:54:12 I'm actually not convinced that the action URL com
vabr (Chromium) 2014/08/21 14:54:12 The test below does not test the different scheme,
Pritam Nikam 2014/08/21 16:49:21 I didn't find any real example though, this partic
Pritam Nikam 2014/08/21 16:49:21 Seems it's quite difficult as we need http and htt
+// identify such cases and *shall not* prompt to save incorrect password.
+IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest,
+ NoPromptForLoginFailedAndServerPushSeperateLoginForm) {
+ NavigateToFile("/password/seperate_login_form.html");
vabr (Chromium) 2014/08/21 14:54:12 typo: seperate -> separate Please also correct in
Pritam Nikam 2014/08/21 16:49:21 Done.
+
+ NavigationObserver observer(WebContents());
+ scoped_ptr<PromptObserver> prompt_observer(
+ PromptObserver::Create(WebContents()));
+ std::string fill_and_submit =
+ "document.getElementById('username_seperate').value = 'temp';"
+ "document.getElementById('password_seperate').value = 'random';"
+ "document.getElementById('submit_seperate').click();";
+ ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), fill_and_submit));
+ observer.Wait();
+
+ EXPECT_FALSE(prompt_observer->IsShowingPrompt());
+}

Powered by Google App Engine
This is Rietveld 408576698