OLD | NEW |
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 <algorithm> | 8 #include <algorithm> |
9 #include <limits> | 9 #include <limits> |
10 #include <list> | 10 #include <list> |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 using syncable::Id; | 79 using syncable::Id; |
80 using syncable::kEncryptedString; | 80 using syncable::kEncryptedString; |
81 using syncable::MutableEntry; | 81 using syncable::MutableEntry; |
82 using syncable::WriteTransaction; | 82 using syncable::WriteTransaction; |
83 | 83 |
84 using syncable::CREATE; | 84 using syncable::CREATE; |
85 using syncable::GET_BY_HANDLE; | 85 using syncable::GET_BY_HANDLE; |
86 using syncable::GET_BY_ID; | 86 using syncable::GET_BY_ID; |
87 using syncable::GET_BY_CLIENT_TAG; | 87 using syncable::GET_BY_CLIENT_TAG; |
88 using syncable::GET_BY_SERVER_TAG; | 88 using syncable::GET_BY_SERVER_TAG; |
| 89 using syncable::GET_TYPE_ROOT; |
89 using syncable::UNITTEST; | 90 using syncable::UNITTEST; |
90 | 91 |
91 using sessions::MockDebugInfoGetter; | 92 using sessions::MockDebugInfoGetter; |
92 using sessions::StatusController; | 93 using sessions::StatusController; |
93 using sessions::SyncSessionContext; | 94 using sessions::SyncSessionContext; |
94 using sessions::SyncSession; | 95 using sessions::SyncSession; |
95 | 96 |
96 namespace { | 97 namespace { |
97 | 98 |
98 // A helper to hold on to the counters emitted by the sync engine. | 99 // A helper to hold on to the counters emitted by the sync engine. |
(...skipping 4862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4961 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id); | 4962 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id); |
4962 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count); | 4963 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count); |
4963 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count); | 4964 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count); |
4964 } else { | 4965 } else { |
4965 EXPECT_TRUE(final_monitor_records.empty()) | 4966 EXPECT_TRUE(final_monitor_records.empty()) |
4966 << "Should not restore records after successful bookmark commit."; | 4967 << "Should not restore records after successful bookmark commit."; |
4967 } | 4968 } |
4968 } | 4969 } |
4969 | 4970 |
4970 } // namespace syncer | 4971 } // namespace syncer |
OLD | NEW |