Lines Matching full:form
142 void AddSeenForm(FormStructure* form) {
143 form_structures()->push_back(form);
154 explicit TestFormStructure(const FormData& form) : FormStructure(form) {}
213 // Set up our form data.
214 FormData form;
215 form.name = ASCIIToUTF16("TestForm");
216 form.method = ASCIIToUTF16("POST");
217 form.origin = GURL("http://example.com/form.html");
218 form.action = GURL("http://example.com/submit.html");
219 form.user_submitted = true;
227 form.fields.push_back(field);
233 form.fields.push_back(field);
239 form.fields.push_back(field);
245 form.fields.push_back(field);
251 form.fields.push_back(field);
258 form.fields.push_back(field);
262 // Simulate having seen this form on page load.
264 TestFormStructure* form_structure = new TestFormStructure(form);
337 // Simulate form submission.
338 EXPECT_NO_FATAL_FAILURE(autofill_manager_->OnFormSubmitted(form));
343 // Set up our form data.
344 FormData form;
345 form.name = ASCIIToUTF16("TestForm");
346 form.method = ASCIIToUTF16("POST");
347 form.origin = GURL("http://example.com/form.html");
348 form.action = GURL("http://example.com/submit.html");
349 form.user_submitted = true;
422 form.fields.push_back(field);
428 // Simulate having seen this form with the desired heuristic and server types.
430 TestFormStructure* form_structure = new TestFormStructure(form);
448 // Simulate form submission.
449 EXPECT_NO_FATAL_FAILURE(autofill_manager_->OnFormSubmitted(form));
452 // Test that we behave sanely when the cached form differs from the submitted
455 // Set up our form data.
456 FormData form;
457 form.name = ASCIIToUTF16("TestForm");
458 form.method = ASCIIToUTF16("POST");
459 form.origin = GURL("http://example.com/form.html");
460 form.action = GURL("http://example.com/submit.html");
461 form.user_submitted = true;
469 form.fields.push_back(field);
474 form.fields.push_back(field);
479 form.fields.push_back(field);
484 form.fields.push_back(field);
488 // Simulate having seen this form with the desired heuristic and server types.
490 TestFormStructure* form_structure = new TestFormStructure(form);
494 // Add a field and re-arrange the remaining form fields before submitting.
495 std::vector<FormField> cached_fields = form.fields;
496 form.fields.clear();
499 form.fields.push_back(field);
500 form.fields.push_back(cached_fields[2]);
501 form.fields.push_back(cached_fields[1]);
502 form.fields.push_back(cached_fields[3]);
503 form.fields.push_back(cached_fields[0]);
585 // Simulate form submission.
586 EXPECT_NO_FATAL_FAILURE(autofill_manager_->OnFormSubmitted(form));
592 FormData form;
593 form.name = ASCIIToUTF16("TestForm");
594 form.method = ASCIIToUTF16("POST");
595 form.origin = GURL("http://example.com/form.html");
596 form.action = GURL("http://example.com/submit.html");
597 form.user_submitted = true;
603 form.fields.push_back(field);
606 form.fields.push_back(field);
608 // Simulate form submission.
611 EXPECT_NO_FATAL_FAILURE(autofill_manager_->OnFormSubmitted(form));
614 form.action = GURL("http://example.com/search?q=Elvis%20Presley");
617 form.fields.push_back(field);
619 // Simulate form submission.
622 EXPECT_NO_FATAL_FAILURE(autofill_manager_->OnFormSubmitted(form));
627 // Set up our form data.
628 FormData form;
629 form.name = ASCIIToUTF16("TestForm");
630 form.method = ASCIIToUTF16("POST");
631 form.origin = GURL("http://example.com/form.html");
632 form.action = GURL("http://example.com/submit.html");
633 form.user_submitted = true;
641 form.fields.push_back(field);
647 form.fields.push_back(field);
653 form.fields.push_back(field);
659 form.fields.push_back(field);
665 form.fields.push_back(field);
671 // Simulate having seen this form on page load.
673 TestFormStructure* form_structure = new TestFormStructure(form);
733 // Simulate form submission.
734 EXPECT_NO_FATAL_FAILURE(autofill_manager_->OnFormSubmitted(form));
763 // Test that we log the number of Autofill suggestions when filling a form.
765 // Set up our form data.
766 FormData form;
767 form.name = ASCIIToUTF16("TestForm");
768 form.method = ASCIIToUTF16("POST");
769 form.origin = GURL("http://example.com/form.html");
770 form.action = GURL("http://example.com/submit.html");
771 form.user_submitted = true;
776 form.fields.push_back(field);
779 form.fields.push_back(field);
782 form.fields.push_back(field);
785 // Simulate having seen this form on page load.
787 TestFormStructure* form_structure = new TestFormStructure(form);
798 autofill_manager_->OnQueryFormFieldAutofill(0, form, field);
803 autofill_manager_->OnQueryFormFieldAutofill(0, form, field);
807 form_structure = new TestFormStructure(form);
816 autofill_manager_->OnQueryFormFieldAutofill(0, form, field);
820 form_structure = new TestFormStructure(form);
829 form.fields[0].is_autofilled = true;
830 autofill_manager_->OnQueryFormFieldAutofill(0, form, field);
833 // Test that we log whether Autofill is enabled when filling a form.