Index: chrome/renderer/autofill/password_autofill_agent_browsertest.cc |
diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc |
index 7ff193846a120f9aac107912a4ffc5da4ecbda4f..41ef2c9338346e80359bbc5814d513fce0e891a5 100644 |
--- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc |
+++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc |
@@ -817,72 +817,6 @@ TEST_F(PasswordAutofillAgentTest, SendPasswordFormsTest_Redirection) { |
AutofillHostMsg_PasswordFormsRendered::ID)); |
} |
-// Tests that a password form in an iframe will not be filled in until a user |
-// interaction with the form. |
-TEST_F(PasswordAutofillAgentTest, IframeNoFillTest) { |
- const char kIframeName[] = "iframe"; |
- const char kWebpageWithIframeStart[] = |
- "<html>" |
- " <head>" |
- " <meta charset='utf-8' />" |
- " <title>Title</title>" |
- " </head>" |
- " <body>" |
- " <iframe name='iframe' src=\""; |
- const char kWebpageWithIframeEnd[] = |
- "\"></iframe>" |
- " </body>" |
- "</html>"; |
- |
- std::string origin("data:text/html;charset=utf-8,"); |
- origin += kSimpleWebpage; |
- |
- std::string page_html(kWebpageWithIframeStart); |
- page_html += origin; |
- page_html += kWebpageWithIframeEnd; |
- |
- LoadHTML(page_html.c_str()); |
- |
- // Set the expected form origin and action URLs. |
- fill_data_.origin = GURL(origin); |
- fill_data_.action = GURL(origin); |
- |
- // Retrieve the input elements from the iframe since that is where we want to |
- // test the autofill. |
- WebFrame* iframe = GetMainFrame()->findChildByName(kIframeName); |
- ASSERT_TRUE(iframe); |
- |
- SimulateOnFillPasswordFormForFrame(iframe, fill_data_); |
- |
- WebDocument document = iframe->document(); |
- |
- WebElement username_element = document.getElementById(kUsernameName); |
- WebElement password_element = document.getElementById(kPasswordName); |
- ASSERT_FALSE(username_element.isNull()); |
- ASSERT_FALSE(password_element.isNull()); |
- |
- WebInputElement username_input = username_element.to<WebInputElement>(); |
- WebInputElement password_input = password_element.to<WebInputElement>(); |
- ASSERT_FALSE(username_element.isNull()); |
- |
- CheckTextFieldsStateForElements( |
- username_input, "", false, password_input, "", false, false); |
- |
- // Simulate the user typing in the username in the iframe which should cause |
- // an autofill. |
- content::RenderFrame::FromWebFrame(iframe) |
- ->OnMessageReceived(AutofillMsg_FirstUserGestureObservedInTab(0)); |
- SimulateUserInputChangeForElement(&username_input, kAliceUsername); |
- |
- CheckTextFieldsStateForElements(username_input, |
- kAliceUsername, |
- true, |
- password_input, |
- kAlicePassword, |
- true, |
- false); |
-} |
- |
// Tests that a password will only be filled as a suggested and will not be |
// accessible by the DOM until a user gesture has occurred. |
TEST_F(PasswordAutofillAgentTest, GestureRequiredTest) { |