summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete_history_manager_unittest.cc
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-02 15:42:04 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-02 15:42:04 +0000
commit65057c4f78bba27939064e03836ca305c0ccaa10 (patch)
treed08cf268cebe0ce03859b51a28ac8bbbb6041c41 /chrome/browser/autocomplete_history_manager_unittest.cc
parent2b78e944747587744e032c40287ec874ad27a9e9 (diff)
downloadchromium_src-65057c4f78bba27939064e03836ca305c0ccaa10.zip
chromium_src-65057c4f78bba27939064e03836ca305c0ccaa10.tar.gz
chromium_src-65057c4f78bba27939064e03836ca305c0ccaa10.tar.bz2
Don't save SSNs.
BUG=http://crbug.com/46590 TEST=unit test Review URL: http://codereview.chromium.org/2853027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51535 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete_history_manager_unittest.cc')
-rw-r--r--chrome/browser/autocomplete_history_manager_unittest.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete_history_manager_unittest.cc b/chrome/browser/autocomplete_history_manager_unittest.cc
index 49a473c..3ff2696 100644
--- a/chrome/browser/autocomplete_history_manager_unittest.cc
+++ b/chrome/browser/autocomplete_history_manager_unittest.cc
@@ -84,3 +84,22 @@ TEST_F(AutocompleteHistoryManagerTest, NonCreditCardNumberValue) {
EXPECT_CALL(*(web_data_service_.get()), AddFormFields(_)).Times(1);
autocomplete_manager_->FormSubmitted(form);
}
+
+// Tests that SSNs are not sent to the WebDatabase to be saved.
+TEST_F(AutocompleteHistoryManagerTest, SSNValue) {
+ FormData form;
+ form.name = ASCIIToUTF16("MyForm");
+ form.method = ASCIIToUTF16("POST");
+ form.origin = GURL("http://myform.com/form.html");
+ form.action = GURL("http://myform.com/submit.html");
+
+ webkit_glue::FormField ssn(ASCIIToUTF16("Social Security Number"),
+ ASCIIToUTF16("ssn"),
+ ASCIIToUTF16("078-05-1120"),
+ ASCIIToUTF16("text"),
+ 20);
+ form.fields.push_back(ssn);
+
+ EXPECT_CALL(*web_data_service_, AddFormFields(_)).Times(0);
+ autocomplete_manager_->FormSubmitted(form);
+}