forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Password Manager] Fix password form reappear detection for empty act…
…ion forms. This CL chnages IsPasswordFormReappeared so it doesn't compare form actions if they are empty. R=cfroussios@chromium.org, kolos@chromium.org Bug: 699539 Change-Id: Ia57c6ec7245d972e5df5f88b64c5ddac9c2c5c43 Reviewed-on: https://chromium-review.googlesource.com/916565 Commit-Queue: Maxim Kolosovskiy <kolos@chromium.org> Reviewed-by: Maxim Kolosovskiy <kolos@chromium.org> Cr-Commit-Position: refs/heads/master@{#537643}
- Loading branch information
Showing
4 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
chrome/test/data/password/navigate_to_same_url_empty_actions.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<html> | ||
<head> | ||
<script src="form_utils.js"></script> | ||
<script> | ||
function redirect() { | ||
window.location.replace('navigate_to_same_url_empty_actions.html?done'); | ||
return false; | ||
} | ||
</script> | ||
<script> | ||
function onLoadHandler() { | ||
// Signin form with an empty action is displayed first, once submitted, | ||
// it navigates to same URL with '?done' appended to it so the if | ||
// statement has the empty action landing page form displayed instead. | ||
if (location.search == '?done') { | ||
var landing_page_form = createSimplePasswordForm(); | ||
landing_page_form.action = ''; | ||
landing_page_form.children[1].id = 'not_username_field'; | ||
landing_page_form.children[1].name = 'not_username_field'; | ||
landing_page_form.children[3].id = 'not_password_field'; | ||
landing_page_form.children[3].name = 'not_password_field'; | ||
landing_page_form.children[4].id = 'not_login_button'; | ||
document.body.appendChild(landing_page_form); | ||
} else { | ||
var signin_form = createSimplePasswordForm(); | ||
signin_form.action = ''; | ||
signin_form.setAttribute('onsubmit', 'return redirect();'); | ||
document.body.appendChild(signin_form); | ||
} | ||
} | ||
</script> | ||
</head> | ||
<body onload="onLoadHandler();"> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters