Fix the no password save issue for ajax login
commitd06bcaca1a000d55e80d9cbf0865eb32f7668ba1
authorgcasto@chromium.org <gcasto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 27 Mar 2013 21:17:57 +0000 (27 21:17 +0000)
committergcasto@chromium.org <gcasto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 27 Mar 2013 21:17:57 +0000 (27 21:17 +0000)
treefde21f8ca3b65fbb27528d4c52b4e0f076862451
parent21bd1d266647cd06dd24581f2a363044bf909a98
Fix the no password save issue for ajax login

The idea is that if a navigation is triggered by non-user gesture after a password form is submitted, then we assume that this navigation is related to the previous form submit and chrome should prompt for saving password if all criteria for provisionally saving password are met.

The link between the previous form submit and the coming navigation is weak, so its possible for chrome to inherit password forms from previous state when it should not. However most false cases would be aborted at PasswordManager::ProvisionallySavePassword, which does a list of sanity checks for saving password, such as if the form is already seen on the current page.

BUG=43219

Review URL: https://chromiumcodereview.appspot.com/12713007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191024 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/password_manager/password_manager_browsertest.cc [new file with mode: 0644]
chrome/chrome_tests.gypi
chrome/test/data/password/password_xhr_done.html [new file with mode: 0644]
chrome/test/data/password/password_xhr_submit.html [new file with mode: 0644]
content/public/renderer/document_state.h
content/renderer/render_view_impl.cc