OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <algorithm> | 8 #include <algorithm> |
9 #include <limits> | 9 #include <limits> |
10 #include <list> | 10 #include <list> |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "sync/engine/get_commit_ids_command.h" | 26 #include "sync/engine/get_commit_ids_command.h" |
27 #include "sync/engine/net/server_connection_manager.h" | 27 #include "sync/engine/net/server_connection_manager.h" |
28 #include "sync/engine/process_updates_command.h" | 28 #include "sync/engine/process_updates_command.h" |
29 #include "sync/engine/sync_scheduler_impl.h" | 29 #include "sync/engine/sync_scheduler_impl.h" |
30 #include "sync/engine/syncer.h" | 30 #include "sync/engine/syncer.h" |
31 #include "sync/engine/syncer_proto_util.h" | 31 #include "sync/engine/syncer_proto_util.h" |
32 #include "sync/engine/throttled_data_type_tracker.h" | 32 #include "sync/engine/throttled_data_type_tracker.h" |
33 #include "sync/engine/traffic_recorder.h" | 33 #include "sync/engine/traffic_recorder.h" |
34 #include "sync/internal_api/public/base/model_type.h" | 34 #include "sync/internal_api/public/base/model_type.h" |
35 #include "sync/internal_api/public/engine/model_safe_worker.h" | 35 #include "sync/internal_api/public/engine/model_safe_worker.h" |
| 36 #include "sync/internal_api/public/util/time.h" |
36 #include "sync/protocol/bookmark_specifics.pb.h" | 37 #include "sync/protocol/bookmark_specifics.pb.h" |
37 #include "sync/protocol/nigori_specifics.pb.h" | 38 #include "sync/protocol/nigori_specifics.pb.h" |
38 #include "sync/protocol/preference_specifics.pb.h" | 39 #include "sync/protocol/preference_specifics.pb.h" |
39 #include "sync/protocol/sync.pb.h" | 40 #include "sync/protocol/sync.pb.h" |
40 #include "sync/sessions/sync_session_context.h" | 41 #include "sync/sessions/sync_session_context.h" |
41 #include "sync/syncable/mutable_entry.h" | 42 #include "sync/syncable/mutable_entry.h" |
42 #include "sync/syncable/nigori_util.h" | 43 #include "sync/syncable/nigori_util.h" |
43 #include "sync/syncable/read_transaction.h" | 44 #include "sync/syncable/read_transaction.h" |
44 #include "sync/syncable/syncable_util.h" | 45 #include "sync/syncable/syncable_util.h" |
45 #include "sync/syncable/write_transaction.h" | 46 #include "sync/syncable/write_transaction.h" |
46 #include "sync/test/engine/fake_model_worker.h" | 47 #include "sync/test/engine/fake_model_worker.h" |
47 #include "sync/test/engine/mock_connection_manager.h" | 48 #include "sync/test/engine/mock_connection_manager.h" |
48 #include "sync/test/engine/test_directory_setter_upper.h" | 49 #include "sync/test/engine/test_directory_setter_upper.h" |
49 #include "sync/test/engine/test_id_factory.h" | 50 #include "sync/test/engine/test_id_factory.h" |
50 #include "sync/test/engine/test_syncable_utils.h" | 51 #include "sync/test/engine/test_syncable_utils.h" |
51 #include "sync/test/fake_encryptor.h" | 52 #include "sync/test/fake_encryptor.h" |
52 #include "sync/test/fake_extensions_activity_monitor.h" | 53 #include "sync/test/fake_extensions_activity_monitor.h" |
53 #include "sync/test/fake_sync_encryption_handler.h" | 54 #include "sync/test/fake_sync_encryption_handler.h" |
54 #include "sync/util/cryptographer.h" | 55 #include "sync/util/cryptographer.h" |
55 #include "sync/util/time.h" | |
56 #include "testing/gtest/include/gtest/gtest.h" | 56 #include "testing/gtest/include/gtest/gtest.h" |
57 | 57 |
58 using base::TimeDelta; | 58 using base::TimeDelta; |
59 | 59 |
60 using std::map; | 60 using std::map; |
61 using std::multimap; | 61 using std::multimap; |
62 using std::set; | 62 using std::set; |
63 using std::string; | 63 using std::string; |
64 | 64 |
65 namespace syncer { | 65 namespace syncer { |
(...skipping 4626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4692 | 4692 |
4693 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { | 4693 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { |
4694 Add(mid_id_); | 4694 Add(mid_id_); |
4695 Add(low_id_); | 4695 Add(low_id_); |
4696 Add(high_id_); | 4696 Add(high_id_); |
4697 SyncShareNudge(); | 4697 SyncShareNudge(); |
4698 ExpectLocalOrderIsByServerId(); | 4698 ExpectLocalOrderIsByServerId(); |
4699 } | 4699 } |
4700 | 4700 |
4701 } // namespace syncer | 4701 } // namespace syncer |
OLD | NEW |