summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/autofill_common_unittest.h
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-13 02:58:20 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-13 02:58:20 +0000
commit280356aaff018a2b33defe80d0c4c73c81883c44 (patch)
treeb1dc5edc46757eb911d6112acf38284b7f306918 /chrome/browser/autofill/autofill_common_unittest.h
parenta1aee38539cdd177ce3f034677f55327051e3763 (diff)
downloadchromium_src-280356aaff018a2b33defe80d0c4c73c81883c44.zip
chromium_src-280356aaff018a2b33defe80d0c4c73c81883c44.tar.gz
chromium_src-280356aaff018a2b33defe80d0c4c73c81883c44.tar.bz2
Adding summary string generation for the AutoFill feature.
Includes a small modification to the generated resources, needed additional whitespace in credit card summary. Added summary generation to autofill_profile.* and modified summary generation in credit_card.* to match. credit_card.* modifications were largely to use string16 instead of std::wstring. Factored out common unit testing utilities into autofill_common_unittest.*, and added unit tests for summary string generation for credit_card.* and autofill_profile.*. BUG=35551 TEST=unit_tests --gtest_filter=AutoFillProfileTest.*:CreditCardTest.* Review URL: http://codereview.chromium.org/606031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39002 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_common_unittest.h')
-rw-r--r--chrome/browser/autofill/autofill_common_unittest.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/chrome/browser/autofill/autofill_common_unittest.h b/chrome/browser/autofill/autofill_common_unittest.h
new file mode 100644
index 0000000..b4de512
--- /dev/null
+++ b/chrome/browser/autofill/autofill_common_unittest.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_COMMON_UNITTEST_H_
+#define CHROME_BROWSER_AUTOFILL_AUTOFILL_COMMON_UNITTEST_H_
+
+class AutoFillProfile;
+class CreditCard;
+
+// Common utilities shared amongst autofill unit tests.
+namespace autofill_unittest {
+
+// A unit testing utility that is common to a number of the autofill unit
+// tests. |SetProfileInfo| provides a quick way to populate a profile with
+// c-strings.
+void SetProfileInfo(AutoFillProfile* profile,
+ const char* label, const char* first_name, const char* middle_name,
+ const char* last_name, const char* email, const char* company,
+ const char* address1, const char* address2, const char* city,
+ const char* state, const char* zipcode, const char* country,
+ const char* phone, const char* fax);
+
+// A unit testing utility that is common to a number of the autofill unit
+// tests. |SetCreditCardInfo| provides a quick way to populate a credit card
+// with c-strings.
+void SetCreditCardInfo(CreditCard* credit_card,
+ const char* label, const char* name_on_card, const char* type,
+ const char* card_number, const char* expiration_month,
+ const char* expiration_year, const char* verification_code,
+ const char* billing_address, const char* shipping_address);
+
+} // namespace
+
+#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_COMMON_UNITTEST_H_
+