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

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

Issue 11198048: [Autofill] Update the autocomplete types implementation to match the current HTML spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update AutofillFieldTest expectations Created 8 years, 2 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/common/form_field_data.cc ('k') | chrome/renderer/autofill/form_autofill_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dd6171b751e10c21d09c0f7a5631d8c7c821a183..c1a5f5a4dcfd58d2ca40130ada8b1b734465c9d0 100644
--- a/chrome/renderer/autofill/autofill_renderer_browsertest.cc
+++ b/chrome/renderer/autofill/autofill_renderer_browsertest.cc
@@ -51,25 +51,27 @@ TEST_F(ChromeRenderViewTest, SendForms) {
expected.name = ASCIIToUTF16("firstname");
expected.value = string16();
- expected.form_control_type = ASCIIToUTF16("text");
+ expected.form_control_type = "text";
expected.max_length = WebInputElement::defaultMaxLength();
EXPECT_FORM_FIELD_DATA_EQUALS(expected, forms[0].fields[0]);
expected.name = ASCIIToUTF16("middlename");
expected.value = string16();
- expected.form_control_type = ASCIIToUTF16("text");
+ expected.form_control_type = "text";
expected.max_length = WebInputElement::defaultMaxLength();
EXPECT_FORM_FIELD_DATA_EQUALS(expected, forms[0].fields[1]);
expected.name = ASCIIToUTF16("lastname");
expected.value = string16();
- expected.form_control_type = ASCIIToUTF16("text");
+ expected.form_control_type = "text";
+ expected.autocomplete_attribute = "off";
expected.max_length = WebInputElement::defaultMaxLength();
EXPECT_FORM_FIELD_DATA_EQUALS(expected, forms[0].fields[2]);
+ expected.autocomplete_attribute = std::string(); // reset
expected.name = ASCIIToUTF16("state");
expected.value = ASCIIToUTF16("?");
- expected.form_control_type = ASCIIToUTF16("select-one");
+ expected.form_control_type = "select-one";
expected.max_length = 0;
EXPECT_FORM_FIELD_DATA_EQUALS(expected, forms[0].fields[3]);
@@ -106,19 +108,19 @@ TEST_F(ChromeRenderViewTest, SendForms) {
expected.name = ASCIIToUTF16("firstname");
expected.value = string16();
- expected.form_control_type = ASCIIToUTF16("text");
+ expected.form_control_type = "text";
expected.max_length = WebInputElement::defaultMaxLength();
EXPECT_FORM_FIELD_DATA_EQUALS(expected, form2.fields[0]);
expected.name = ASCIIToUTF16("middlename");
expected.value = string16();
- expected.form_control_type = ASCIIToUTF16("text");
+ expected.form_control_type = "text";
expected.max_length = WebInputElement::defaultMaxLength();
EXPECT_FORM_FIELD_DATA_EQUALS(expected, form2.fields[1]);
expected.name = ASCIIToUTF16("state");
expected.value = ASCIIToUTF16("?");
- expected.form_control_type = ASCIIToUTF16("select-one");
+ expected.form_control_type = "select-one";
expected.max_length = 0;
EXPECT_FORM_FIELD_DATA_EQUALS(expected, form2.fields[2]);
}
« no previous file with comments | « chrome/common/form_field_data.cc ('k') | chrome/renderer/autofill/form_autofill_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698