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

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

Issue 23033016: Remove autocheckout code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Even more deletes, and Ilya review. Created 7 years, 4 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/renderer/autofill/autofill_renderer_browsertest.cc
diff --git a/chrome/renderer/autofill/autofill_renderer_browsertest.cc b/chrome/renderer/autofill/autofill_renderer_browsertest.cc
index cbb05e421600bd6742e543c9c1f5be235a75b314..20581cfdf135db55f1ff9fbb8d98c3e2e1d6768b 100644
--- a/chrome/renderer/autofill/autofill_renderer_browsertest.cc
+++ b/chrome/renderer/autofill/autofill_renderer_browsertest.cc
@@ -131,61 +131,6 @@ TEST_F(ChromeRenderViewTest, SendForms) {
EXPECT_FORM_FIELD_DATA_EQUALS(expected, form2.fields[2]);
}
-TEST_F(ChromeRenderViewTest, SendDynamicForms) {
- // Don't want any delay for form state sync changes. This will still post a
- // message so updates will get coalesced, but as soon as we spin the message
- // loop, it will generate an update.
- SendContentStateImmediately();
-
- LoadHTML("<form method=\"POST\" id=\"testform\">"
- " <input type=\"text\" id=\"firstname\"/>"
- " <input type=\"text\" id=\"middlename\"/>"
- " <input type=\"text\" id=\"lastname\" autoComplete=\"off\"/>"
- " <input type=\"hidden\" id=\"email\"/>"
- " <select id=\"state\"/>"
- " <option>?</option>"
- " <option>California</option>"
- " <option>Texas</option>"
- " </select>"
- "</form>");
-
- // Verify that "FormsSeen" sends the expected number of fields.
- const IPC::Message* message = render_thread_->sink().GetFirstMessageMatching(
- AutofillHostMsg_FormsSeen::ID);
- ASSERT_NE(static_cast<IPC::Message*>(NULL), message);
- AutofillHostMsg_FormsSeen::Param params;
- AutofillHostMsg_FormsSeen::Read(message, &params);
- const std::vector<FormData>& forms = params.a;
- ASSERT_EQ(1UL, forms.size());
- ASSERT_EQ(4UL, forms[0].fields.size());
-
- autofill_agent_->OnAutocheckoutSupported();
- render_thread_->sink().ClearMessages();
- ExecuteJavaScript("var newInput=document.createElement(\"input\");"
- "newInput.setAttribute(\"type\",\"text\");"
- "newInput.setAttribute(\"id\", \"telephone\");"
- "document.getElementById(\"testform\")"
- ".appendChild(newInput);");
- msg_loop_.RunUntilIdle();
-
- // Verify that FormsSeen is present with the new field.
- const IPC::Message* message2 = render_thread_->sink().GetFirstMessageMatching(
- AutofillHostMsg_FormsSeen::ID);
- ASSERT_NE(static_cast<IPC::Message*>(NULL), message2);
- AutofillHostMsg_FormsSeen::Read(message2, &params);
- const std::vector<FormData>& new_forms = params.a;
- ASSERT_EQ(1UL, new_forms.size());
- ASSERT_EQ(5UL, new_forms[0].fields.size());
-
- FormFieldData expected;
-
- expected.name = ASCIIToUTF16("telephone");
- expected.value = string16();
- expected.form_control_type = "text";
- expected.max_length = WebInputElement::defaultMaxLength();
- EXPECT_FORM_FIELD_DATA_EQUALS(expected, forms[0].fields[4]);
-}
-
TEST_F(ChromeRenderViewTest, EnsureNoFormSeenIfTooFewFields) {
// Don't want any delay for form state sync changes. This will still post a
// message so updates will get coalesced, but as soon as we spin the message

Powered by Google App Engine
This is Rietveld 408576698