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

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

Issue 13912016: [Autofill] Handle the Tab Key in the new UI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Switch to ObserverList and AddTest Created 7 years, 8 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/autofill/autofill_browsertest.cc
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc
index 53124586ba22d7737e477767ed8f9146becd2a7b..11e68683caecacf3ab1fb79a1ef5559644ce8723 100644
--- a/chrome/browser/autofill/autofill_browsertest.cc
+++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -587,6 +587,31 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_AutofillViaDownArrow) {
ExpectFilledTestForm();
}
+IN_PROC_BROWSER_TEST_F(AutofillTest, AutofillSelectViaTab) {
+ CreateTestProfile();
+
+ // Load the test page.
+ ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(),
+ GURL(std::string(kDataURIPrefix) + kTestFormString)));
+
+ // Focus a fillable field.
+ FocusFirstNameField();
+
+ // Press the down arrow to initiate Autofill and wait for the popup to be
+ // shown.
+ SendKeyToPageAndWait(ui::VKEY_DOWN);
+
+ // Press the down arrow to select the suggestion and preview the autofilled
+ // form.
+ SendKeyToPopupAndWait(ui::VKEY_DOWN);
+
+ // Press tab to accept the autofill suggestions.
+ SendKeyToPopupAndWait(ui::VKEY_TAB);
+
+ // The form should be filled.
+ ExpectFilledTestForm();
+}
+
// http://crbug.com/150084
#if defined(OS_MACOSX)
#define MAYBE_OnChangeAfterAutofill OnChangeAfterAutofill

Powered by Google App Engine
This is Rietveld 408576698