summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/form_structure_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autofill/form_structure_unittest.cc')
-rw-r--r--chrome/browser/autofill/form_structure_unittest.cc42
1 files changed, 0 insertions, 42 deletions
diff --git a/chrome/browser/autofill/form_structure_unittest.cc b/chrome/browser/autofill/form_structure_unittest.cc
index aca45d1..4dbc3ce 100644
--- a/chrome/browser/autofill/form_structure_unittest.cc
+++ b/chrome/browser/autofill/form_structure_unittest.cc
@@ -61,13 +61,6 @@ class FormStructureTest {
static std::string Hash64Bit(const std::string& str) {
return FormStructure::Hash64Bit(str);
}
-
- static void SetPageDetails(FormStructure* form,
- int page_number,
- int total_pages) {
- form->current_page_number_ = page_number;
- form->total_pages_ = total_pages;
- }
};
TEST(FormStructureTest, FieldCount) {
@@ -96,41 +89,6 @@ TEST(FormStructureTest, FieldCount) {
EXPECT_EQ(3U, form_structure.field_count());
}
-TEST(FormStructureTest, AutofillFlowInfo) {
- FormData form;
- form.method = ASCIIToUTF16("post");
-
- FormFieldData field;
- field.label = ASCIIToUTF16("username");
- field.name = ASCIIToUTF16("username");
- field.form_control_type = "text";
- form.fields.push_back(field);
-
- FormStructure form_structure(form);
- EXPECT_FALSE(form_structure.IsStartOfAutofillableFlow());
- EXPECT_FALSE(form_structure.IsInAutofillableFlow());
-
- FormStructureTest::SetPageDetails(&form_structure, -1, 0);
- EXPECT_FALSE(form_structure.IsStartOfAutofillableFlow());
- EXPECT_FALSE(form_structure.IsInAutofillableFlow());
-
- FormStructureTest::SetPageDetails(&form_structure, 0, 0);
- EXPECT_FALSE(form_structure.IsStartOfAutofillableFlow());
- EXPECT_FALSE(form_structure.IsInAutofillableFlow());
-
- FormStructureTest::SetPageDetails(&form_structure, 0, 1);
- EXPECT_TRUE(form_structure.IsStartOfAutofillableFlow());
- EXPECT_TRUE(form_structure.IsInAutofillableFlow());
-
- FormStructureTest::SetPageDetails(&form_structure, 1, 2);
- EXPECT_FALSE(form_structure.IsStartOfAutofillableFlow());
- EXPECT_TRUE(form_structure.IsInAutofillableFlow());
-
- FormStructureTest::SetPageDetails(&form_structure, 2, 2);
- EXPECT_FALSE(form_structure.IsStartOfAutofillableFlow());
- EXPECT_FALSE(form_structure.IsInAutofillableFlow());
-}
-
TEST(FormStructureTest, AutofillCount) {
FormData form;
form.method = ASCIIToUTF16("post");