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

Unified Diff: chrome/browser/autofill/form_structure_unittest.cc

Issue 4985003: Revert 66214 - Display a warning when autofill is disabled for a website.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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/browser/autofill/form_structure.cc ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/form_structure_unittest.cc
===================================================================
--- chrome/browser/autofill/form_structure_unittest.cc (revision 66219)
+++ chrome/browser/autofill/form_structure_unittest.cc (working copy)
@@ -199,7 +199,7 @@
ASCIIToUTF16("submit"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_FALSE(form_structure->IsAutoFillable(true));
+ EXPECT_FALSE(form_structure->IsAutoFillable());
// We now have three text fields, but only two auto-fillable fields.
form.fields.push_back(webkit_glue::FormField(ASCIIToUTF16("First Name"),
@@ -213,7 +213,7 @@
ASCIIToUTF16("text"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_FALSE(form_structure->IsAutoFillable(true));
+ EXPECT_FALSE(form_structure->IsAutoFillable());
// We now have three auto-fillable fields.
form.fields.push_back(webkit_glue::FormField(ASCIIToUTF16("Email"),
@@ -222,25 +222,23 @@
ASCIIToUTF16("text"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
- // The method must be 'post', though we can intentionally ignore this
- // criterion for the sake of providing a helpful warning message to the user.
+ // The method must be 'post'.
form.method = ASCIIToUTF16("get");
form_structure.reset(new FormStructure(form));
- EXPECT_FALSE(form_structure->IsAutoFillable(true));
- EXPECT_TRUE(form_structure->IsAutoFillable(false));
+ EXPECT_FALSE(form_structure->IsAutoFillable());
// The target cannot include http(s)://*/search...
form.method = ASCIIToUTF16("post");
form.action = GURL("http://google.com/search?q=hello");
form_structure.reset(new FormStructure(form));
- EXPECT_FALSE(form_structure->IsAutoFillable(true));
+ EXPECT_FALSE(form_structure->IsAutoFillable());
// But search can be in the URL.
form.action = GURL("http://search.com/?q=hello");
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
}
TEST(FormStructureTest, HeuristicsContactInfo) {
@@ -294,7 +292,7 @@
ASCIIToUTF16("submit"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
// Expect the correct number of fields.
ASSERT_EQ(9U, form_structure->field_count());
@@ -412,7 +410,7 @@
ASCIIToUTF16("submit"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
// Expect the correct number of fields.
ASSERT_EQ(17U, form_structure->field_count());
@@ -505,7 +503,7 @@
ASCIIToUTF16("submit"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
ASSERT_EQ(10U, form_structure->field_count());
ASSERT_EQ(9U, form_structure->autofill_count());
@@ -583,7 +581,7 @@
ASCIIToUTF16("submit"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
ASSERT_EQ(7U, form_structure->field_count());
ASSERT_EQ(6U, form_structure->autofill_count());
@@ -657,7 +655,7 @@
ASCIIToUTF16("submit"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
ASSERT_EQ(9U, form_structure->field_count());
ASSERT_EQ(8U, form_structure->autofill_count());
@@ -718,7 +716,7 @@
ASCIIToUTF16("submit"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
ASSERT_EQ(6U, form_structure->field_count());
ASSERT_EQ(4U, form_structure->autofill_count());
@@ -780,7 +778,7 @@
ASCIIToUTF16("submit"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
ASSERT_EQ(7U, form_structure->field_count());
ASSERT_EQ(4U, form_structure->autofill_count());
@@ -831,7 +829,7 @@
ASCIIToUTF16("text"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
ASSERT_EQ(4U, form_structure->field_count());
ASSERT_EQ(3U, form_structure->autofill_count());
@@ -877,7 +875,7 @@
ASCIIToUTF16("text"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
ASSERT_EQ(4U, form_structure->field_count());
ASSERT_EQ(4U, form_structure->autofill_count());
@@ -927,7 +925,7 @@
ASCIIToUTF16("text"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
ASSERT_EQ(4U, form_structure->field_count());
ASSERT_EQ(3U, form_structure->autofill_count());
@@ -968,7 +966,7 @@
ASCIIToUTF16("text"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
ASSERT_EQ(3U, form_structure->field_count());
ASSERT_EQ(3U, form_structure->autofill_count());
@@ -1004,7 +1002,7 @@
ASCIIToUTF16("text"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
ASSERT_EQ(3U, form_structure->field_count());
ASSERT_EQ(3U, form_structure->autofill_count());
@@ -1089,7 +1087,7 @@
ASCIIToUTF16("text"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
ASSERT_EQ(11U, form_structure->field_count());
ASSERT_EQ(11U, form_structure->autofill_count());
@@ -1138,7 +1136,7 @@
ASCIIToUTF16("text"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
ASSERT_EQ(4U, form_structure->field_count());
ASSERT_EQ(3U, form_structure->autofill_count());
@@ -1209,7 +1207,7 @@
ASCIIToUTF16("submit"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
// Expect the correct number of fields.
ASSERT_EQ(10U, form_structure->field_count());
@@ -1268,7 +1266,7 @@
ASCIIToUTF16("text"),
0));
form_structure.reset(new FormStructure(form));
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutoFillable());
// Expect the correct number of fields.
ASSERT_EQ(5U, form_structure->field_count());
« no previous file with comments | « chrome/browser/autofill/form_structure.cc ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698