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

Unified Diff: chrome/renderer/autofill/autofill_browsertest.cc

Issue 9235072: Adding Mouse Support for new GTK Autofill (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing problem with autofillAgent browser tests Created 8 years, 10 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
« no previous file with comments | « chrome/renderer/autofill/autofill_agent.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/autofill_browsertest.cc
diff --git a/chrome/renderer/autofill/autofill_browsertest.cc b/chrome/renderer/autofill/autofill_browsertest.cc
index 50694ddff561e3e416e7981b40429368669d779a..a4c5d7ef09f0d95adddb5e277b78f3ec4e0fa00b 100644
--- a/chrome/renderer/autofill/autofill_browsertest.cc
+++ b/chrome/renderer/autofill/autofill_browsertest.cc
@@ -83,6 +83,9 @@ TEST_F(ChromeRenderViewTest, SendForms) {
WebInputElement firstname =
document.getElementById("firstname").to<WebInputElement>();
+ // Make sure to query for Autofill suggestions before selecting one.
+ autofill_agent_->QueryAutofillSuggestions(firstname, false);
+
// Accept suggestion that contains a label. Labeled items indicate Autofill
// as opposed to Autocomplete. We're testing this distinction below with
// the |AutofillHostMsg_FillAutofillFormData::ID| message.
@@ -149,6 +152,9 @@ TEST_F(ChromeRenderViewTest, FillFormElement) {
document.getElementById("middlename").to<WebInputElement>();
middlename.setAutofilled(true);
+ // Make sure to query for Autofill suggestions before selecting one.
+ autofill_agent_->QueryAutofillSuggestions(firstname, false);
+
// Accept a suggestion in a form that has been auto-filled. This triggers
// the direct filling of the firstname element with value parameter.
autofill_agent_->didAcceptAutofillSuggestion(firstname,
« no previous file with comments | « chrome/renderer/autofill/autofill_agent.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698