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

Side by Side Diff: components/sync/engine_impl/syncer_unittest.cc

Issue 2245073003: [Sync] Clean up intra-sync DEPS significantly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments/fix test. Created 4 years, 4 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 // Syncer unit tests. Unfortunately a lot of these tests 5 // Syncer unit tests. Unfortunately a lot of these tests
6 // are outdated and need to be reworked and updated. 6 // are outdated and need to be reworked and updated.
7 7
8 #include "components/sync/engine_impl/syncer.h" 8 #include "components/sync/engine_impl/syncer.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 14 matching lines...) Expand all
25 #include "base/location.h" 25 #include "base/location.h"
26 #include "base/macros.h" 26 #include "base/macros.h"
27 #include "base/message_loop/message_loop.h" 27 #include "base/message_loop/message_loop.h"
28 #include "base/strings/string_number_conversions.h" 28 #include "base/strings/string_number_conversions.h"
29 #include "base/test/histogram_tester.h" 29 #include "base/test/histogram_tester.h"
30 #include "base/time/time.h" 30 #include "base/time/time.h"
31 #include "build/build_config.h" 31 #include "build/build_config.h"
32 #include "components/sync/base/cancelation_signal.h" 32 #include "components/sync/base/cancelation_signal.h"
33 #include "components/sync/base/cryptographer.h" 33 #include "components/sync/base/cryptographer.h"
34 #include "components/sync/base/extensions_activity.h" 34 #include "components/sync/base/extensions_activity.h"
35 #include "components/sync/base/fake_encryptor.h"
35 #include "components/sync/base/model_type.h" 36 #include "components/sync/base/model_type.h"
36 #include "components/sync/base/time.h" 37 #include "components/sync/base/time.h"
37 #include "components/sync/engine/model_safe_worker.h" 38 #include "components/sync/engine/model_safe_worker.h"
38 #include "components/sync/engine_impl/backoff_delay_provider.h" 39 #include "components/sync/engine_impl/backoff_delay_provider.h"
39 #include "components/sync/engine_impl/get_commit_ids.h" 40 #include "components/sync/engine_impl/get_commit_ids.h"
40 #include "components/sync/engine_impl/net/server_connection_manager.h" 41 #include "components/sync/engine_impl/net/server_connection_manager.h"
41 #include "components/sync/engine_impl/sync_scheduler_impl.h" 42 #include "components/sync/engine_impl/sync_scheduler_impl.h"
42 #include "components/sync/engine_impl/syncer_proto_util.h" 43 #include "components/sync/engine_impl/syncer_proto_util.h"
43 #include "components/sync/protocol/bookmark_specifics.pb.h" 44 #include "components/sync/protocol/bookmark_specifics.pb.h"
44 #include "components/sync/protocol/nigori_specifics.pb.h" 45 #include "components/sync/protocol/nigori_specifics.pb.h"
45 #include "components/sync/protocol/preference_specifics.pb.h" 46 #include "components/sync/protocol/preference_specifics.pb.h"
46 #include "components/sync/protocol/sync.pb.h" 47 #include "components/sync/protocol/sync.pb.h"
47 #include "components/sync/sessions/commit_counters.h" 48 #include "components/sync/sessions/commit_counters.h"
48 #include "components/sync/sessions/status_counters.h" 49 #include "components/sync/sessions/status_counters.h"
49 #include "components/sync/sessions/update_counters.h" 50 #include "components/sync/sessions/update_counters.h"
50 #include "components/sync/sessions_impl/sync_session_context.h" 51 #include "components/sync/sessions_impl/sync_session_context.h"
51 #include "components/sync/syncable/mutable_entry.h" 52 #include "components/sync/syncable/mutable_entry.h"
52 #include "components/sync/syncable/nigori_util.h" 53 #include "components/sync/syncable/nigori_util.h"
53 #include "components/sync/syncable/syncable_delete_journal.h" 54 #include "components/sync/syncable/syncable_delete_journal.h"
54 #include "components/sync/syncable/syncable_read_transaction.h" 55 #include "components/sync/syncable/syncable_read_transaction.h"
55 #include "components/sync/syncable/syncable_util.h" 56 #include "components/sync/syncable/syncable_util.h"
56 #include "components/sync/syncable/syncable_write_transaction.h" 57 #include "components/sync/syncable/syncable_write_transaction.h"
57 #include "components/sync/test/engine/fake_model_worker.h" 58 #include "components/sync/test/engine/fake_model_worker.h"
58 #include "components/sync/test/engine/mock_connection_manager.h" 59 #include "components/sync/test/engine/mock_connection_manager.h"
59 #include "components/sync/test/engine/mock_nudge_handler.h" 60 #include "components/sync/test/engine/mock_nudge_handler.h"
60 #include "components/sync/test/engine/test_directory_setter_upper.h" 61 #include "components/sync/test/engine/test_directory_setter_upper.h"
61 #include "components/sync/test/engine/test_id_factory.h" 62 #include "components/sync/test/engine/test_id_factory.h"
62 #include "components/sync/test/engine/test_syncable_utils.h" 63 #include "components/sync/test/engine/test_syncable_utils.h"
63 #include "components/sync/test/fake_encryptor.h"
64 #include "components/sync/test/fake_sync_encryption_handler.h" 64 #include "components/sync/test/fake_sync_encryption_handler.h"
65 #include "components/sync/test/sessions/mock_debug_info_getter.h" 65 #include "components/sync/test/sessions/mock_debug_info_getter.h"
66 #include "testing/gmock/include/gmock/gmock.h" 66 #include "testing/gmock/include/gmock/gmock.h"
67 #include "testing/gtest/include/gtest/gtest.h" 67 #include "testing/gtest/include/gtest/gtest.h"
68 68
69 using base::TimeDelta; 69 using base::TimeDelta;
70 70
71 using std::count; 71 using std::count;
72 using std::map; 72 using std::map;
73 using std::multimap; 73 using std::multimap;
(...skipping 5778 matching lines...) Expand 10 before | Expand all | Expand 10 after
5852 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id); 5852 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id);
5853 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count); 5853 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count);
5854 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count); 5854 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count);
5855 } else { 5855 } else {
5856 EXPECT_TRUE(final_monitor_records.empty()) 5856 EXPECT_TRUE(final_monitor_records.empty())
5857 << "Should not restore records after successful bookmark commit."; 5857 << "Should not restore records after successful bookmark commit.";
5858 } 5858 }
5859 } 5859 }
5860 5860
5861 } // namespace syncer 5861 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine_impl/model_type_worker_unittest.cc ('k') | components/sync/sessions_impl/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698