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

Side by Side Diff: components/autofill/core/browser/autofill_test_utils.h

Issue 180953004: Componentize several Autofill unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review Created 6 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TEST_UTILS_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TEST_UTILS_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TEST_UTILS_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TEST_UTILS_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 9
10 class PrefService; 10 class PrefService;
11 11
12 namespace content {
13 class BrowserContext;
14 }
15
16 namespace autofill { 12 namespace autofill {
17 13
18 class AutofillProfile; 14 class AutofillProfile;
19 class CreditCard; 15 class CreditCard;
20 struct FormData; 16 struct FormData;
21 struct FormFieldData; 17 struct FormFieldData;
22 18
23 // Common utilities shared amongst Autofill tests. 19 // Common utilities shared amongst Autofill tests.
24 namespace test { 20 namespace test {
25 21
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // A unit testing utility that is common to a number of the Autofill unit 82 // A unit testing utility that is common to a number of the Autofill unit
87 // tests. |SetCreditCardInfo| provides a quick way to populate a credit card 83 // tests. |SetCreditCardInfo| provides a quick way to populate a credit card
88 // with c-strings. 84 // with c-strings.
89 void SetCreditCardInfo(CreditCard* credit_card, 85 void SetCreditCardInfo(CreditCard* credit_card,
90 const char* name_on_card, const char* card_number, 86 const char* name_on_card, const char* card_number,
91 const char* expiration_month, const char* expiration_year); 87 const char* expiration_month, const char* expiration_year);
92 88
93 // TODO(isherman): We should do this automatically for all tests, not manually 89 // TODO(isherman): We should do this automatically for all tests, not manually
94 // on a per-test basis: http://crbug.com/57221 90 // on a per-test basis: http://crbug.com/57221
95 // Disables or mocks out code that would otherwise reach out to system services. 91 // Disables or mocks out code that would otherwise reach out to system services.
96 void DisableSystemServices(content::BrowserContext* browser_context); 92 void DisableSystemServices(PrefService* prefs);
97 93
98 } // namespace test 94 } // namespace test
99 } // namespace autofill 95 } // namespace autofill
100 96
101 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TEST_UTILS_H_ 97 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_metrics_unittest.cc ('k') | components/autofill/core/browser/autofill_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698