OLD | NEW |
1 // Copyright (c) 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 // Unit tests for the SyncApi. Note that a lot of the underlying | 5 // Unit tests for the SyncApi. Note that a lot of the underlying |
6 // functionality is provided by the Syncable layer, which has its own | 6 // functionality is provided by the Syncable layer, which has its own |
7 // unit tests. We'll test SyncApi specific things in this harness. | 7 // unit tests. We'll test SyncApi specific things in this harness. |
8 | 8 |
9 #include <cstddef> | 9 #include <cstddef> |
10 #include <map> | 10 #include <map> |
11 | 11 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "sync/protocol/extension_specifics.pb.h" | 54 #include "sync/protocol/extension_specifics.pb.h" |
55 #include "sync/protocol/password_specifics.pb.h" | 55 #include "sync/protocol/password_specifics.pb.h" |
56 #include "sync/protocol/preference_specifics.pb.h" | 56 #include "sync/protocol/preference_specifics.pb.h" |
57 #include "sync/protocol/proto_value_conversions.h" | 57 #include "sync/protocol/proto_value_conversions.h" |
58 #include "sync/protocol/sync.pb.h" | 58 #include "sync/protocol/sync.pb.h" |
59 #include "sync/sessions/sync_session.h" | 59 #include "sync/sessions/sync_session.h" |
60 #include "sync/syncable/directory.h" | 60 #include "sync/syncable/directory.h" |
61 #include "sync/syncable/entry.h" | 61 #include "sync/syncable/entry.h" |
62 #include "sync/syncable/mutable_entry.h" | 62 #include "sync/syncable/mutable_entry.h" |
63 #include "sync/syncable/nigori_util.h" | 63 #include "sync/syncable/nigori_util.h" |
64 #include "sync/syncable/read_transaction.h" | |
65 #include "sync/syncable/syncable_id.h" | 64 #include "sync/syncable/syncable_id.h" |
66 #include "sync/syncable/write_transaction.h" | 65 #include "sync/syncable/syncable_read_transaction.h" |
| 66 #include "sync/syncable/syncable_write_transaction.h" |
67 #include "sync/test/callback_counter.h" | 67 #include "sync/test/callback_counter.h" |
68 #include "sync/test/engine/fake_sync_scheduler.h" | 68 #include "sync/test/engine/fake_sync_scheduler.h" |
69 #include "sync/test/fake_encryptor.h" | 69 #include "sync/test/fake_encryptor.h" |
70 #include "sync/test/fake_extensions_activity_monitor.h" | 70 #include "sync/test/fake_extensions_activity_monitor.h" |
71 #include "sync/util/cryptographer.h" | 71 #include "sync/util/cryptographer.h" |
72 #include "sync/util/extensions_activity_monitor.h" | 72 #include "sync/util/extensions_activity_monitor.h" |
73 #include "sync/util/test_unrecoverable_error_handler.h" | 73 #include "sync/util/test_unrecoverable_error_handler.h" |
74 #include "sync/util/time.h" | 74 #include "sync/util/time.h" |
75 #include "testing/gmock/include/gmock/gmock.h" | 75 #include "testing/gmock/include/gmock/gmock.h" |
76 #include "testing/gtest/include/gtest/gtest.h" | 76 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 2995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3072 Difference(ModelTypeSet::All(), disabled_types); | 3072 Difference(ModelTypeSet::All(), disabled_types); |
3073 | 3073 |
3074 // Verify only the non-disabled types remain after cleanup. | 3074 // Verify only the non-disabled types remain after cleanup. |
3075 sync_manager_.PurgeDisabledTypes(enabled_types, new_enabled_types); | 3075 sync_manager_.PurgeDisabledTypes(enabled_types, new_enabled_types); |
3076 EXPECT_TRUE(new_enabled_types.Equals(sync_manager_.InitialSyncEndedTypes())); | 3076 EXPECT_TRUE(new_enabled_types.Equals(sync_manager_.InitialSyncEndedTypes())); |
3077 EXPECT_TRUE(disabled_types.Equals( | 3077 EXPECT_TRUE(disabled_types.Equals( |
3078 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()))); | 3078 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()))); |
3079 } | 3079 } |
3080 | 3080 |
3081 } // namespace | 3081 } // namespace |
OLD | NEW |