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

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

Issue 2970013003: [Payment Request] Displays appropriate footer if first transaction completed (Closed)
Patch Set: Created 3 years, 5 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
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 #include "components/autofill/core/browser/autofill_test_utils.h" 5 #include "components/autofill/core/browser/autofill_test_utils.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "components/autofill/core/browser/autofill_manager.h" 12 #include "components/autofill/core/browser/autofill_manager.h"
13 #include "components/autofill/core/browser/autofill_profile.h" 13 #include "components/autofill/core/browser/autofill_profile.h"
14 #include "components/autofill/core/browser/credit_card.h" 14 #include "components/autofill/core/browser/credit_card.h"
15 #include "components/autofill/core/browser/field_types.h" 15 #include "components/autofill/core/browser/field_types.h"
16 #include "components/autofill/core/browser/webdata/autofill_table.h" 16 #include "components/autofill/core/browser/webdata/autofill_table.h"
17 #include "components/autofill/core/common/autofill_constants.h" 17 #include "components/autofill/core/common/autofill_constants.h"
18 #include "components/autofill/core/common/autofill_pref_names.h" 18 #include "components/autofill/core/common/autofill_pref_names.h"
19 #include "components/autofill/core/common/form_data.h" 19 #include "components/autofill/core/common/form_data.h"
20 #include "components/autofill/core/common/form_field_data.h" 20 #include "components/autofill/core/common/form_field_data.h"
21 #include "components/os_crypt/os_crypt_mocker.h" 21 #include "components/os_crypt/os_crypt_mocker.h"
22 #include "components/payments/core/payment_prefs.h"
22 #include "components/pref_registry/pref_registry_syncable.h" 23 #include "components/pref_registry/pref_registry_syncable.h"
23 #include "components/prefs/pref_service.h" 24 #include "components/prefs/pref_service.h"
24 #include "components/prefs/pref_service_factory.h" 25 #include "components/prefs/pref_service_factory.h"
25 #include "components/prefs/testing_pref_store.h" 26 #include "components/prefs/testing_pref_store.h"
26 #include "components/signin/core/browser/account_fetcher_service.h" 27 #include "components/signin/core/browser/account_fetcher_service.h"
27 #include "components/signin/core/browser/account_tracker_service.h" 28 #include "components/signin/core/browser/account_tracker_service.h"
28 #include "components/signin/core/common/signin_pref_names.h" 29 #include "components/signin/core/common/signin_pref_names.h"
29 30
30 using base::ASCIIToUTF16; 31 using base::ASCIIToUTF16;
31 32
32 namespace autofill { 33 namespace autofill {
33 namespace test { 34 namespace test {
34 35
35 std::unique_ptr<PrefService> PrefServiceForTesting() { 36 std::unique_ptr<PrefService> PrefServiceForTesting() {
36 scoped_refptr<user_prefs::PrefRegistrySyncable> registry( 37 scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
37 new user_prefs::PrefRegistrySyncable()); 38 new user_prefs::PrefRegistrySyncable());
38 AutofillManager::RegisterProfilePrefs(registry.get()); 39 AutofillManager::RegisterProfilePrefs(registry.get());
40 ::payments::RegisterProfilePrefs(registry.get());
39 41
40 // PDM depends on these prefs, which are normally registered in 42 // PDM depends on these prefs, which are normally registered in
41 // SigninManagerFactory. 43 // SigninManagerFactory.
42 registry->RegisterStringPref(::prefs::kGoogleServicesAccountId, 44 registry->RegisterStringPref(::prefs::kGoogleServicesAccountId,
43 std::string()); 45 std::string());
44 registry->RegisterStringPref(::prefs::kGoogleServicesLastAccountId, 46 registry->RegisterStringPref(::prefs::kGoogleServicesLastAccountId,
45 std::string()); 47 std::string());
46 registry->RegisterStringPref(::prefs::kGoogleServicesLastUsername, 48 registry->RegisterStringPref(::prefs::kGoogleServicesLastUsername,
47 std::string()); 49 std::string());
48 registry->RegisterStringPref(::prefs::kGoogleServicesUserAccountId, 50 registry->RegisterStringPref(::prefs::kGoogleServicesUserAccountId,
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 const char* control_type) { 378 const char* control_type) {
377 field->set_signature(signature); 379 field->set_signature(signature);
378 if (name) 380 if (name)
379 field->set_name(name); 381 field->set_name(name);
380 if (control_type) 382 if (control_type)
381 field->set_type(control_type); 383 field->set_type(control_type);
382 } 384 }
383 385
384 } // namespace test 386 } // namespace test
385 } // namespace autofill 387 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698