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

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

Issue 10705006: Focus should be moved to the next input field after we generate the password. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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/password_generation_manager.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/password_generation_manager_browsertest.cc
diff --git a/chrome/renderer/autofill/password_generation_manager_browsertest.cc b/chrome/renderer/autofill/password_generation_manager_browsertest.cc
index 0095c4a261ef43740abaed1c990077bb2f629b7d..6b434e84d963f9777659bdc6778678589b5a3b0f 100644
--- a/chrome/renderer/autofill/password_generation_manager_browsertest.cc
+++ b/chrome/renderer/autofill/password_generation_manager_browsertest.cc
@@ -106,6 +106,7 @@ const char kAccountCreationFormHTML[] =
" <INPUT type = 'text' id = 'username'/> "
" <INPUT type = 'password' id = 'first_password' size=5/> "
" <INPUT type = 'password' id = 'second_password' size=5/> "
+ " <INPUT type = 'text' id = 'address'/> "
" <INPUT type = 'submit' value = 'LOGIN' />"
"</FORM>";
@@ -210,6 +211,13 @@ TEST_F(PasswordGenerationManagerTest, FillTest) {
EXPECT_EQ(password, second_password_element.value());
EXPECT_TRUE(first_password_element.isAutofilled());
EXPECT_TRUE(second_password_element.isAutofilled());
+
+ // Focus moved to the next input field.
+ // TODO(zysxqn): Change this back to the address element once Bug 90224
+ // https://bugs.webkit.org/show_bug.cgi?id=90224 has been fixed.
+ element = document.getElementById(WebString::fromUTF8("first_password"));
+ ASSERT_FALSE(element.isNull());
+ EXPECT_EQ(element, document.focusedNode());
}
TEST_F(PasswordGenerationManagerTest, BlacklistedTest) {
« no previous file with comments | « chrome/renderer/autofill/password_generation_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698