summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgcasto <gcasto@chromium.org>2014-11-03 17:14:11 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-04 01:14:29 +0000
commit2c646227ce20163e7a2816487a62cf57a20bb269 (patch)
treee99d3cc33e00c3d6340399a31b7c27f5c28946c1
parentb85fc6de11e5e162864d58a32da6a02a9a24ea3a (diff)
downloadchromium_src-2c646227ce20163e7a2816487a62cf57a20bb269.zip
chromium_src-2c646227ce20163e7a2816487a62cf57a20bb269.tar.gz
chromium_src-2c646227ce20163e7a2816487a62cf57a20bb269.tar.bz2
[Password Autofill] Disable one click popup on Android.
This is a temporary fix to a bug where the popup is shown then immediately hidden as a result of the keyboard showing. Reverting to the old two click behavior, on Android only, until we can fix the underlying issue. BUG=423464 Review URL: https://codereview.chromium.org/695953003 Cr-Commit-Position: refs/heads/master@{#302537}
-rw-r--r--chrome/renderer/autofill/password_autofill_agent_browsertest.cc5
-rw-r--r--components/autofill/content/renderer/autofill_agent.cc23
2 files changed, 21 insertions, 7 deletions
diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
index 451b1fc..0c0a81b 100644
--- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
+++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
@@ -1442,6 +1442,9 @@ TEST_F(PasswordAutofillAgentTest, SendsLoggingStateUpdatePingOnConstruction) {
EXPECT_TRUE(message);
}
+// TODO(gcasto): Re-enabled these tests after crbug.com/423464 has been fixed.
+#if !defined(OS_ANDROID)
+
// Tests that one user click on a username field is sufficient to bring up a
// credential suggestion popup, and the user can autocomplete the password by
// selecting the credential from the popup.
@@ -1503,6 +1506,8 @@ TEST_F(PasswordAutofillAgentTest, CredentialsOnClick) {
ExpectAllCredentials();
}
+#endif // !defined(OS_ANDROID)
+
// The user types in a password, but then just before sending the form off, a
// script clears that password. This test checks that PasswordAutofillAgent can
// still remember the password typed by the user.
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index 0a9b57f..2f59e54 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -318,13 +318,22 @@ void AutofillAgent::FormControlElementClicked(
bool show_full_suggestion_list = element.isAutofilled() || was_focused;
bool show_password_suggestions_only = !was_focused;
- ShowSuggestions(element,
- true,
- false,
- true,
- false,
- show_full_suggestion_list,
- show_password_suggestions_only);
+
+ // TODO(gcasto): Remove after crbug.com/423464 has been fixed.
+ bool show_suggestions = true;
+#if defined(OS_ANDROID)
+ show_suggestions = was_focused;
+#endif
+
+ if (show_suggestions) {
+ ShowSuggestions(element,
+ true,
+ false,
+ true,
+ false,
+ show_full_suggestion_list,
+ show_password_suggestions_only);
+ }
}
void AutofillAgent::textFieldDidEndEditing(const WebInputElement& element) {