Lines Matching refs:form_structure
5 #include "components/autofill/core/browser/form_structure.h"
65 scoped_ptr<FormStructure> form_structure;
93 form_structure.reset(new FormStructure(form));
94 EXPECT_EQ(4U, form_structure->field_count());
98 scoped_ptr<FormStructure> form_structure;
124 form_structure.reset(new FormStructure(form));
125 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
126 EXPECT_EQ(1U, form_structure->autofill_count());
136 form_structure.reset(new FormStructure(form));
137 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
138 EXPECT_EQ(1U, form_structure->autofill_count());
145 FormStructure form_structure(form);
147 EXPECT_EQ(form.origin, form_structure.source_url());
151 scoped_ptr<FormStructure> form_structure;
174 form_structure.reset(new FormStructure(form));
175 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
176 EXPECT_FALSE(form_structure->IsAutofillable(true));
189 form_structure.reset(new FormStructure(form));
190 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
191 EXPECT_FALSE(form_structure->IsAutofillable(true));
199 form_structure.reset(new FormStructure(form));
200 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
201 EXPECT_TRUE(form_structure->IsAutofillable(true));
206 form_structure.reset(new FormStructure(form));
207 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
208 EXPECT_FALSE(form_structure->IsAutofillable(true));
209 EXPECT_TRUE(form_structure->IsAutofillable(false));
214 form_structure.reset(new FormStructure(form));
215 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
216 EXPECT_FALSE(form_structure->IsAutofillable(true));
220 form_structure.reset(new FormStructure(form));
221 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
222 EXPECT_TRUE(form_structure->IsAutofillable(true));
226 scoped_ptr<FormStructure> form_structure;
249 form_structure.reset(new FormStructure(form));
250 EXPECT_FALSE(form_structure->ShouldBeParsed(true));
263 form_structure.reset(new FormStructure(form));
264 EXPECT_TRUE(form_structure->ShouldBeParsed(true));
269 form_structure.reset(new FormStructure(form));
270 EXPECT_FALSE(form_structure->IsAutofillable(true));
271 EXPECT_TRUE(form_structure->ShouldBeParsed(false));
276 form_structure.reset(new FormStructure(form));
277 EXPECT_FALSE(form_structure->ShouldBeParsed(true));
281 form_structure.reset(new FormStructure(form));
282 EXPECT_TRUE(form_structure->ShouldBeParsed(true));
303 form_structure.reset(new FormStructure(form));
304 EXPECT_TRUE(form_structure->ShouldBeParsed(true));
308 form_structure.reset(new FormStructure(form));
309 EXPECT_FALSE(form_structure->ShouldBeParsed(true));
313 scoped_ptr<FormStructure> form_structure;
353 form_structure.reset(new FormStructure(form));
354 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
355 EXPECT_TRUE(form_structure->IsAutofillable(true));
358 ASSERT_EQ(8U, form_structure->field_count());
359 ASSERT_EQ(7U, form_structure->autofill_count());
362 EXPECT_EQ(NAME_FIRST, form_structure->field(0)->heuristic_type());
364 EXPECT_EQ(NAME_LAST, form_structure->field(1)->heuristic_type());
366 EXPECT_EQ(EMAIL_ADDRESS, form_structure->field(2)->heuristic_type());
369 form_structure->field(3)->heuristic_type());
371 EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(4)->heuristic_type());
373 EXPECT_EQ(ADDRESS_HOME_CITY, form_structure->field(5)->heuristic_type());
375 EXPECT_EQ(ADDRESS_HOME_ZIP, form_structure->field(6)->heuristic_type());
377 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(7)->heuristic_type());
382 scoped_ptr<FormStructure> form_structure;
404 form_structure.reset(new FormStructure(form));
405 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
406 EXPECT_TRUE(form_structure->IsAutofillable(true));
409 ASSERT_EQ(3U, form_structure->field_count());
410 ASSERT_EQ(3U, form_structure->autofill_count());
412 EXPECT_EQ(HTML_TYPE_GIVEN_NAME, form_structure->field(0)->html_type());
413 EXPECT_EQ(HTML_TYPE_FAMILY_NAME, form_structure->field(1)->html_type());
414 EXPECT_EQ(HTML_TYPE_EMAIL, form_structure->field(2)->html_type());
415 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(0)->heuristic_type());
416 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(1)->heuristic_type());
417 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(2)->heuristic_type());
423 scoped_ptr<FormStructure> form_structure;
445 form_structure.reset(new FormStructure(form));
446 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
447 EXPECT_TRUE(form_structure->IsAutofillable(true));
450 ASSERT_EQ(3U, form_structure->field_count());
451 EXPECT_EQ(3U, form_structure->autofill_count());
453 EXPECT_EQ(HTML_TYPE_TEL_LOCAL, form_structure->field(0)->html_type());
454 EXPECT_EQ(AutofillField::IGNORED, form_structure->field(0)->phone_part());
455 EXPECT_EQ(HTML_TYPE_TEL_LOCAL_PREFIX, form_structure->field(1)->html_type());
457 form_structure->field(1)->phone_part());
458 EXPECT_EQ(HTML_TYPE_TEL_LOCAL_SUFFIX, form_structure->field(2)->html_type());
460 form_structure->field(2)->phone_part());
466 scoped_ptr<FormStructure> form_structure;
486 form_structure.reset(new FormStructure(form));
487 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
488 EXPECT_TRUE(form_structure->IsAutofillable(true));
489 EXPECT_TRUE(form_structure->ShouldBeCrowdsourced());
491 form_structure->field_count());
492 ASSERT_EQ(3U, form_structure->autofill_count());
494 EXPECT_EQ(NAME_FIRST, form_structure->field(0)->heuristic_type());
495 EXPECT_EQ(NAME_LAST, form_structure->field(1)->heuristic_type());
496 EXPECT_EQ(EMAIL_ADDRESS, form_structure->field(2)->heuristic_type());
500 form_structure.reset(new FormStructure(form));
501 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
502 EXPECT_FALSE(form_structure->IsAutofillable(true));
503 EXPECT_FALSE(form_structure->ShouldBeCrowdsourced());
505 ASSERT_EQ(3U, form_structure->field_count());
506 ASSERT_EQ(0U, form_structure->autofill_count());
508 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(0)->heuristic_type());
509 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(1)->heuristic_type());
510 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(2)->heuristic_type());
560 FormStructure form_structure(form);
561 form_structure.DetermineHeuristicTypes(TestAutofillMetrics());
562 EXPECT_TRUE(form_structure.IsAutofillable(true));
565 ASSERT_EQ(9U, form_structure.field_count());
566 EXPECT_EQ(9U, form_structure.autofill_count());
572 section_names.insert(form_structure.field(i)->section());
605 FormStructure form_structure(form);
606 form_structure.DetermineHeuristicTypes(TestAutofillMetrics());
609 ASSERT_EQ(6U, form_structure.field_count());
610 EXPECT_EQ(2U, form_structure.autofill_count());
616 section_names.insert(form_structure.field(i)->section());
635 FormStructure form_structure(form);
636 form_structure.DetermineHeuristicTypes(TestAutofillMetrics());
639 ASSERT_EQ(2U, form_structure.field_count());
640 EXPECT_EQ(2U, form_structure.autofill_count());
646 section_names.insert(form_structure.field(i)->section());
673 FormStructure form_structure(form);
674 form_structure.DetermineHeuristicTypes(TestAutofillMetrics());
677 ASSERT_EQ(4U, form_structure.field_count());
678 EXPECT_EQ(4U, form_structure.autofill_count());
683 EXPECT_EQ(ASCIIToUTF16("one"), form_structure.field(0)->name);
684 EXPECT_EQ(ASCIIToUTF16("two"), form_structure.field(3)->name);
685 EXPECT_EQ(form_structure.field(0)->section(),
686 form_structure.field(3)->section());
690 scoped_ptr<FormStructure> form_structure;
738 form_structure.reset(new FormStructure(form));
739 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
740 EXPECT_TRUE(form_structure->IsAutofillable(true));
741 ASSERT_EQ(10U, form_structure->field_count());
742 ASSERT_EQ(9U, form_structure->autofill_count());
745 EXPECT_EQ(NAME_FIRST, form_structure->field(0)->heuristic_type());
747 EXPECT_EQ(NAME_LAST, form_structure->field(1)->heuristic_type());
749 EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(2)->heuristic_type());
751 EXPECT_EQ(ADDRESS_HOME_LINE2, form_structure->field(3)->heuristic_type());
753 EXPECT_EQ(ADDRESS_HOME_CITY, form_structure->field(4)->heuristic_type());
755 EXPECT_EQ(ADDRESS_HOME_STATE, form_structure->field(5)->heuristic_type());
757 EXPECT_EQ(ADDRESS_HOME_ZIP, form_structure->field(6)->heuristic_type());
759 EXPECT_EQ(ADDRESS_HOME_COUNTRY, form_structure->field(7)->heuristic_type());
762 form_structure->field(8)->heuristic_type());
764 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(9)->heuristic_type());
768 scoped_ptr<FormStructure> form_structure;
805 form_structure.reset(new FormStructure(form));
806 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
807 EXPECT_TRUE(form_structure->IsAutofillable(true));
808 ASSERT_EQ(7U, form_structure->field_count());
809 ASSERT_EQ(6U, form_structure->autofill_count());
812 EXPECT_EQ(EMAIL_ADDRESS, form_structure->field(0)->heuristic_type());
814 EXPECT_EQ(NAME_FULL, form_structure->field(1)->heuristic_type());
816 EXPECT_EQ(COMPANY_NAME, form_structure->field(2)->heuristic_type());
818 EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(3)->heuristic_type());
820 EXPECT_EQ(ADDRESS_HOME_CITY, form_structure->field(4)->heuristic_type());
822 EXPECT_EQ(ADDRESS_HOME_ZIP, form_structure->field(5)->heuristic_type());
824 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(6)->heuristic_type());
831 scoped_ptr<FormStructure> form_structure;
871 form_structure.reset(new FormStructure(form));
872 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
873 EXPECT_TRUE(form_structure->IsAutofillable(true));
874 ASSERT_EQ(8U, form_structure->field_count());
875 ASSERT_EQ(7U, form_structure->autofill_count());
878 EXPECT_EQ(NAME_FIRST, form_structure->field(0)->heuristic_type());
880 EXPECT_EQ(NAME_LAST, form_structure->field(1)->heuristic_type());
882 EXPECT_EQ(EMAIL_ADDRESS, form_structure->field(2)->heuristic_type());
885 form_structure->field(3)->heuristic_type());
887 EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(4)->heuristic_type());
889 EXPECT_EQ(ADDRESS_HOME_LINE2, form_structure->field(5)->heuristic_type());
891 EXPECT_EQ(ADDRESS_HOME_ZIP, form_structure->field(6)->heuristic_type());
893 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(7)->heuristic_type());
897 scoped_ptr<FormStructure> form_structure;
929 form_structure.reset(new FormStructure(form));
930 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
931 EXPECT_TRUE(form_structure->IsAutofillable(true));
932 ASSERT_EQ(6U, form_structure->field_count());
933 ASSERT_EQ(5U, form_structure->autofill_count());
936 EXPECT_EQ(CREDIT_CARD_NAME, form_structure->field(0)->heuristic_type());
938 EXPECT_EQ(CREDIT_CARD_NUMBER, form_structure->field(1)->heuristic_type());
940 EXPECT_EQ(CREDIT_CARD_EXP_MONTH, form_structure->field(2)->heuristic_type());
943 form_structure->field(3)->heuristic_type());
946 form_structure->field(4)->heuristic_type());
948 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(5)->heuristic_type());
952 scoped_ptr<FormStructure> form_structure;
990 form_structure.reset(new FormStructure(form));
991 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
992 EXPECT_TRUE(form_structure->IsAutofillable(true));
993 ASSERT_EQ(7U, form_structure->field_count());
994 ASSERT_EQ(5U, form_structure->autofill_count());
997 EXPECT_EQ(CREDIT_CARD_NAME, form_structure->field(0)->heuristic_type());
999 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(1)->heuristic_type());
1001 EXPECT_EQ(CREDIT_CARD_NUMBER, form_structure->field(2)->heuristic_type());
1003 EXPECT_EQ(CREDIT_CARD_EXP_MONTH, form_structure->field(3)->heuristic_type());
1006 form_structure->field(4)->heuristic_type());
1009 form_structure->field(5)->heuristic_type());
1011 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(6)->heuristic_type());
1015 scoped_ptr<FormStructure> form_structure;
1038 form_structure.reset(new FormStructure(form));
1039 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
1040 EXPECT_TRUE(form_structure->IsAutofillable(true));
1041 ASSERT_EQ(4U, form_structure->field_count());
1042 ASSERT_EQ(3U, form_structure->autofill_count());
1045 EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(0)->heuristic_type());
1047 EXPECT_EQ(ADDRESS_HOME_LINE2, form_structure->field(1)->heuristic_type());
1049 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(2)->heuristic_type());
1051 EXPECT_EQ(ADDRESS_HOME_CITY, form_structure->field(3)->heuristic_type());
1056 scoped_ptr<FormStructure> form_structure;
1079 form_structure.reset(new FormStructure(form));
1080 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
1081 ASSERT_EQ(4U, form_structure->field_count());
1082 ASSERT_EQ(2U, form_structure->autofill_count());
1085 EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(0)->heuristic_type());
1087 EXPECT_EQ(ADDRESS_HOME_LINE2, form_structure->field(1)->heuristic_type());
1089 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(2)->heuristic_type());
1091 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(3)->heuristic_type());
1100 scoped_ptr<FormStructure> form_structure;
1123 form_structure.reset(new FormStructure(form));
1124 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
1125 EXPECT_TRUE(form_structure->IsAutofillable(true));
1126 ASSERT_EQ(4U, form_structure->field_count());
1127 EXPECT_EQ(3U, form_structure->autofill_count());
1130 EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(0)->heuristic_type());
1132 EXPECT_EQ(ADDRESS_HOME_LINE2, form_structure->field(1)->heuristic_type());
1134 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(2)->heuristic_type());
1136 EXPECT_EQ(ADDRESS_HOME_CITY, form_structure->field(3)->heuristic_type());
1143 scoped_ptr<FormStructure> form_structure;
1162 form_structure.reset(new FormStructure(form));
1163 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
1164 EXPECT_TRUE(form_structure->IsAutofillable(true));
1165 ASSERT_EQ(3U, form_structure->field_count());
1166 ASSERT_EQ(3U, form_structure->autofill_count());
1169 EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(0)->heuristic_type());
1171 EXPECT_EQ(ADDRESS_HOME_LINE2, form_structure->field(1)->heuristic_type());
1173 EXPECT_EQ(ADDRESS_HOME_CITY, form_structure->field(2)->heuristic_type());
1177 scoped_ptr<FormStructure> form_structure;
1196 form_structure.reset(new FormStructure(form));
1197 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
1198 EXPECT_TRUE(form_structure->IsAutofillable(true));
1199 ASSERT_EQ(3U, form_structure->field_count());
1200 ASSERT_EQ(3U, form_structure->autofill_count());
1203 EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(0)->heuristic_type());
1205 EXPECT_EQ(ADDRESS_HOME_LINE2, form_structure->field(1)->heuristic_type());
1207 EXPECT_EQ(ADDRESS_HOME_STATE, form_structure->field(2)->heuristic_type());
1212 scoped_ptr<FormStructure> form_structure;
1263 form_structure.reset(new FormStructure(form));
1264 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
1265 EXPECT_TRUE(form_structure->IsAutofillable(true));
1266 ASSERT_EQ(11U, form_structure->field_count());
1267 ASSERT_EQ(11U, form_structure->autofill_count());
1269 EXPECT_EQ(NAME_FIRST, form_structure->field(0)->heuristic_type());
1270 EXPECT_EQ(NAME_LAST, form_structure->field(1)->heuristic_type());
1271 EXPECT_EQ(COMPANY_NAME, form_structure->field(2)->heuristic_type());
1272 EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(3)->heuristic_type());
1273 EXPECT_EQ(ADDRESS_HOME_LINE2, form_structure->field(4)->heuristic_type());
1274 EXPECT_EQ(ADDRESS_HOME_CITY, form_structure->field(5)->heuristic_type());
1275 EXPECT_EQ(ADDRESS_HOME_STATE, form_structure->field(6)->heuristic_type());
1276 EXPECT_EQ(ADDRESS_HOME_COUNTRY, form_structure->field(7)->heuristic_type());
1277 EXPECT_EQ(ADDRESS_HOME_ZIP, form_structure->field(8)->heuristic_type());
1279 form_structure->field(9)->heuristic_type());
1280 EXPECT_EQ(EMAIL_ADDRESS, form_structure->field(10)->heuristic_type());
1284 scoped_ptr<FormStructure> form_structure;
1313 form_structure.reset(new FormStructure(form));
1314 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
1315 EXPECT_TRUE(form_structure->IsAutofillable(true));
1316 ASSERT_EQ(4U, form_structure->field_count());
1317 ASSERT_EQ(3U, form_structure->autofill_count());
1320 EXPECT_EQ(PHONE_HOME_CITY_CODE, form_structure->field(0)->heuristic_type());
1323 form_structure->field(1)->heuristic_type());
1326 form_structure->field(2)->heuristic_type());
1328 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(3)->heuristic_type());
1332 scoped_ptr<FormStructure> form_structure;
1359 form_structure.reset(new FormStructure(form));
1360 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
1361 EXPECT_TRUE(form_structure->IsAutofillable(true));
1364 ASSERT_EQ(5U, form_structure->field_count());
1365 EXPECT_EQ(5U, form_structure->autofill_count());
1368 EXPECT_EQ(CREDIT_CARD_NAME, form_structure->field(0)->heuristic_type());
1370 EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(1)->heuristic_type());
1372 EXPECT_EQ(CREDIT_CARD_NUMBER, form_structure->field(2)->heuristic_type());
1374 EXPECT_EQ(CREDIT_CARD_EXP_MONTH, form_structure->field(3)->heuristic_type());
1377 form_structure->field(4)->heuristic_type());
1381 scoped_ptr<FormStructure> form_structure;
1412 form_structure.reset(new FormStructure(form));
1413 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
1414 EXPECT_TRUE(form_structure->IsAutofillable(true));
1417 ASSERT_EQ(6U, form_structure
1418 ASSERT_EQ(5U, form_structure->autofill_count());
1421 EXPECT_EQ(CREDIT_CARD_NUMBER, form_structure->field(0)->heuristic_type());
1423 EXPECT_EQ(CREDIT_CARD_NAME, form_structure->field(1)->heuristic_type());
1425 EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(2)->heuristic_type());
1427 EXPECT_EQ(CREDIT_CARD_EXP_MONTH, form_structure->field(3)->heuristic_type());
1430 form_structure->field(4)->heuristic_type());
1433 form_structure->field(5)->heuristic_type());
1571 scoped_ptr<FormStructure> form_structure;
1575 form_structure.reset(new FormStructure(form));
1576 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
1623 form_structure.reset(new FormStructure(form));
1625 ASSERT_EQ(form_structure->field_count(), possible_field_types.size());
1626 for (size_t i = 0; i < form_structure->field_count(); ++i)
1627 form_structure->field(i)->set_possible_types(possible_field_types[i]);
1641 EXPECT_TRUE(form_structure->EncodeUploadRequest(available_field_types, false,
1654 EXPECT_TRUE(form_structure->EncodeUploadRequest(available_field_types, true,
1681 form_structure.reset(new FormStructure(form));
1682 ASSERT_EQ(form_structure->field_count(), possible_field_types.size());
1683 for (size_t i = 0; i < form_structure->field_count(); ++i)
1684 form_structure->field(i)->set_possible_types(possible_field_types[i]);
1686 EXPECT_TRUE(form_structure->EncodeUploadRequest(available_field_types, false,
1720 form_structure.reset(new FormStructure(form));
1721 ASSERT_EQ(form_structure->field_count(), possible_field_types.size());
1722 for (size_t i = 0; i < form_structure->field_count(); ++i)
1723 form_structure->field(i)->set_possible_types(possible_field_types[i]);
1724 EXPECT_FALSE(form_structure->EncodeUploadRequest(available_field_types, false,
1729 scoped_ptr<FormStructure> form_structure;
1733 form_structure.reset(new FormStructure(form));
1734 form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
1781 form_structure.reset(new FormStructure(form));
1783 ASSERT_EQ(form_structure->field_count(), possible_field_types.size());
1784 for (size_t i = 0; i < form_structure->field_count(); ++i)
1785 form_structure->field(i)->set_possible_types(possible_field_types[i]);
1799 EXPECT_TRUE(form_structure->EncodeFieldAssignments(
1826 form_structure.reset(new FormStructure(form));
1827 ASSERT_EQ(form_structure->field_count(), possible_field_types.size());
1828 for (size_t i = 0; i < form_structure->field_count(); ++i)
1829 form_structure->field(i)->set_possible_types(possible_field_types[i]);
1831 EXPECT_TRUE(form_structure->EncodeFieldAssignments(
1875 FormStructure form_structure(form);
1879 for (size_t i = 0; i < form_structure.field_count(); ++i)
1880 form_structure.field(i)->set_possible_types(unknown_type);
1888 EXPECT_TRUE(form_structure.EncodeUploadRequest(available_field_types, false,
1918 EXPECT_TRUE(form_structure.EncodeUploadRequest(available_field_types, false,
1972 EXPECT_TRUE(form_structure.EncodeUploadRequest(available_field_types, false,
2004 EXPECT_TRUE(form_structure.EncodeUploadRequest(available_field_types, false,
2072 EXPECT_TRUE(form_structure.EncodeUploadRequest(available_field_types, false,
2109 scoped_ptr<FormStructure> form_structure;
2141 form_structure.reset(new FormStructure(form));
2143 for (size_t i = 0; i < form_structure->field_count(); ++i)
2144 form_structure->field(i)->set_possible_types(possible_field_types[i]);
2148 EXPECT_TRUE(form_structure->EncodeUploadRequest(available_field_types, false,
2162 form_structure->field(2)->set_possible_types(possible_field_types[2]);
2163 EXPECT_TRUE(form_structure->EncodeUploadRequest(available_field_types, false,
2177 form_structure->field(form_structure->field_count() - 1)->set_possible_types(
2178 possible_field_types[form_structure->field_count() - 1]);
2179 EXPECT_TRUE(form_structure->EncodeUploadRequest(available_field_types, false,
2196 form_structure->field(form_structure->field_count() - 1)->set_possible_types(
2197 possible_field_types[form_structure->field_count() - 1]);
2198 EXPECT_TRUE(form_structure->EncodeUploadRequest(available_field_types, false,
2216 scoped_ptr<FormStructure> form_structure;
2238 form_structure.reset(new FormStructure(form));
2242 form_structure->FormSignature());
2245 form_structure.reset(new FormStructure(form));
2248 form_structure->FormSignature());
2251 form_structure.reset(new FormStructure(form));
2254 form_structure->FormSignature());
2257 form_structure.reset(new FormStructure(form));
2260 form_structure->FormSignature());
2276 form_structure.reset(new FormStructure(form));
2280 form_structure->FormSignature());
2373 FormStructure form_structure(form_data);
2376 form_structure.ParseFieldTypesFromAutocompleteAttributes(&unused, &unused);
2380 form_structure.PossibleValues(ADDRESS_BILLING_COUNTRY);
2391 EXPECT_EQ(0U, form_structure.PossibleValues(ADDRESS_HOME_COUNTRY).size());