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

Side by Side Diff: chrome/browser/sync/profile_sync_service_autofill_unittest.cc

Issue 1305213009: Componentize PrefSyncableService and support classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable
Patch Set: Add missing dependency on //sync:test_support_sync_api for unit tests with gn Created 5 years, 3 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/location.h" 16 #include "base/location.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/message_loop/message_loop.h" 19 #include "base/message_loop/message_loop.h"
20 #include "base/strings/string16.h" 20 #include "base/strings/string16.h"
21 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
22 #include "base/synchronization/waitable_event.h" 22 #include "base/synchronization/waitable_event.h"
23 #include "base/time/time.h" 23 #include "base/time/time.h"
24 #include "chrome/browser/autofill/personal_data_manager_factory.h" 24 #include "chrome/browser/autofill/personal_data_manager_factory.h"
25 #include "chrome/browser/prefs/pref_service_syncable.h"
26 #include "chrome/browser/signin/account_tracker_service_factory.h" 25 #include "chrome/browser/signin/account_tracker_service_factory.h"
27 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" 26 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h"
28 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 27 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
29 #include "chrome/browser/signin/signin_manager_factory.h" 28 #include "chrome/browser/signin/signin_manager_factory.h"
30 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" 29 #include "chrome/browser/sync/abstract_profile_sync_service_test.h"
31 #include "chrome/browser/sync/glue/autofill_data_type_controller.h" 30 #include "chrome/browser/sync/glue/autofill_data_type_controller.h"
32 #include "chrome/browser/sync/glue/autofill_profile_data_type_controller.h" 31 #include "chrome/browser/sync/glue/autofill_profile_data_type_controller.h"
33 #include "chrome/browser/sync/profile_sync_service.h" 32 #include "chrome/browser/sync/profile_sync_service.h"
34 #include "chrome/browser/sync/profile_sync_service_factory.h" 33 #include "chrome/browser/sync/profile_sync_service_factory.h"
35 #include "chrome/browser/sync/profile_sync_test_util.h" 34 #include "chrome/browser/sync/profile_sync_test_util.h"
36 #include "chrome/browser/sync/test_profile_sync_service.h" 35 #include "chrome/browser/sync/test_profile_sync_service.h"
37 #include "chrome/browser/web_data_service_factory.h" 36 #include "chrome/browser/web_data_service_factory.h"
38 #include "chrome/test/base/testing_browser_process.h" 37 #include "chrome/test/base/testing_browser_process.h"
39 #include "chrome/test/base/testing_profile.h" 38 #include "chrome/test/base/testing_profile.h"
40 #include "chrome/test/base/testing_profile_manager.h" 39 #include "chrome/test/base/testing_profile_manager.h"
41 #include "components/autofill/core/browser/autofill_test_utils.h" 40 #include "components/autofill/core/browser/autofill_test_utils.h"
42 #include "components/autofill/core/browser/personal_data_manager.h" 41 #include "components/autofill/core/browser/personal_data_manager.h"
43 #include "components/autofill/core/browser/webdata/autocomplete_syncable_service .h" 42 #include "components/autofill/core/browser/webdata/autocomplete_syncable_service .h"
44 #include "components/autofill/core/browser/webdata/autofill_change.h" 43 #include "components/autofill/core/browser/webdata/autofill_change.h"
45 #include "components/autofill/core/browser/webdata/autofill_entry.h" 44 #include "components/autofill/core/browser/webdata/autofill_entry.h"
46 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_ser vice.h" 45 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_ser vice.h"
47 #include "components/autofill/core/browser/webdata/autofill_table.h" 46 #include "components/autofill/core/browser/webdata/autofill_table.h"
48 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" 47 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
49 #include "components/signin/core/browser/account_tracker_service.h" 48 #include "components/signin/core/browser/account_tracker_service.h"
50 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" 49 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h"
51 #include "components/signin/core/browser/signin_manager.h" 50 #include "components/signin/core/browser/signin_manager.h"
52 #include "components/sync_driver/data_type_controller.h" 51 #include "components/sync_driver/data_type_controller.h"
53 #include "components/sync_driver/fake_sync_client.h" 52 #include "components/sync_driver/fake_sync_client.h"
53 #include "components/syncable_prefs/pref_service_syncable.h"
54 #include "components/webdata/common/web_database.h" 54 #include "components/webdata/common/web_database.h"
55 #include "components/webdata_services/web_data_service_test_util.h" 55 #include "components/webdata_services/web_data_service_test_util.h"
56 #include "content/public/test/test_browser_thread.h" 56 #include "content/public/test/test_browser_thread.h"
57 #include "google_apis/gaia/gaia_constants.h" 57 #include "google_apis/gaia/gaia_constants.h"
58 #include "sync/internal_api/public/base/model_type.h" 58 #include "sync/internal_api/public/base/model_type.h"
59 #include "sync/internal_api/public/data_type_debug_info_listener.h" 59 #include "sync/internal_api/public/data_type_debug_info_listener.h"
60 #include "sync/internal_api/public/read_node.h" 60 #include "sync/internal_api/public/read_node.h"
61 #include "sync/internal_api/public/read_transaction.h" 61 #include "sync/internal_api/public/read_transaction.h"
62 #include "sync/internal_api/public/write_node.h" 62 #include "sync/internal_api/public/write_node.h"
63 #include "sync/internal_api/public/write_transaction.h" 63 #include "sync/internal_api/public/write_transaction.h"
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 std::vector<AutofillEntry> sync_entries; 1302 std::vector<AutofillEntry> sync_entries;
1303 std::vector<AutofillProfile> sync_profiles; 1303 std::vector<AutofillProfile> sync_profiles;
1304 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); 1304 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles));
1305 EXPECT_EQ(3U, sync_entries.size()); 1305 EXPECT_EQ(3U, sync_entries.size());
1306 EXPECT_EQ(0U, sync_profiles.size()); 1306 EXPECT_EQ(0U, sync_profiles.size());
1307 for (size_t i = 0; i < sync_entries.size(); i++) { 1307 for (size_t i = 0; i < sync_entries.size(); i++) {
1308 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() 1308 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name()
1309 << ", " << sync_entries[i].key().value(); 1309 << ", " << sync_entries[i].key().value();
1310 } 1310 }
1311 } 1311 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/profile_sync_service_startup_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698