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 // Utilities to verify the state of items in unit tests. | 5 // Utilities to verify the state of items in unit tests. |
6 | 6 |
7 #include "sync/test/engine/test_syncable_utils.h" | 7 #include "sync/test/engine/test_syncable_utils.h" |
8 | 8 |
9 #include "sync/syncable/base_transaction.h" | |
10 #include "sync/syncable/directory.h" | 9 #include "sync/syncable/directory.h" |
11 #include "sync/syncable/entry.h" | 10 #include "sync/syncable/entry.h" |
12 #include "sync/syncable/mutable_entry.h" | 11 #include "sync/syncable/mutable_entry.h" |
13 #include "sync/syncable/write_transaction.h" | 12 #include "sync/syncable/syncable_base_transaction.h" |
| 13 #include "sync/syncable/syncable_write_transaction.h" |
14 #include "sync/test/engine/test_id_factory.h" | 14 #include "sync/test/engine/test_id_factory.h" |
15 | 15 |
16 using std::string; | 16 using std::string; |
17 | 17 |
18 namespace syncer { | 18 namespace syncer { |
19 namespace syncable { | 19 namespace syncable { |
20 | 20 |
21 int CountEntriesWithName(BaseTransaction* rtrans, | 21 int CountEntriesWithName(BaseTransaction* rtrans, |
22 const syncable::Id& parent_id, | 22 const syncable::Id& parent_id, |
23 const string& name) { | 23 const string& name) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 node.Put(syncable::IS_DEL, false); | 84 node.Put(syncable::IS_DEL, false); |
85 node.Put(syncable::ID, syncer::TestIdFactory::MakeServer(tag_name)); | 85 node.Put(syncable::ID, syncer::TestIdFactory::MakeServer(tag_name)); |
86 sync_pb::EntitySpecifics specifics; | 86 sync_pb::EntitySpecifics specifics; |
87 syncer::AddDefaultFieldValue(type, &specifics); | 87 syncer::AddDefaultFieldValue(type, &specifics); |
88 node.Put(syncable::SERVER_SPECIFICS, specifics); | 88 node.Put(syncable::SERVER_SPECIFICS, specifics); |
89 node.Put(syncable::SPECIFICS, specifics); | 89 node.Put(syncable::SPECIFICS, specifics); |
90 } | 90 } |
91 | 91 |
92 } // namespace syncable | 92 } // namespace syncable |
93 } // namespace syncer | 93 } // namespace syncer |
OLD | NEW |