OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "sync/engine/directory_commit_contribution.h" | 5 #include "sync/engine/directory_commit_contribution.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "sync/internal_api/public/base/attachment_id_proto.h" | 8 #include "sync/internal_api/public/base/attachment_id_proto.h" |
9 #include "sync/sessions/status_controller.h" | 9 #include "sync/sessions/status_controller.h" |
10 #include "sync/syncable/entry.h" | 10 #include "sync/syncable/entry.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 response->set_id_string(entity.id_string()); | 98 response->set_id_string(entity.id_string()); |
99 } | 99 } |
100 | 100 |
101 syncable::Directory* dir() { | 101 syncable::Directory* dir() { |
102 return dir_maker_.directory(); | 102 return dir_maker_.directory(); |
103 } | 103 } |
104 | 104 |
105 TestIdFactory id_factory_; | 105 TestIdFactory id_factory_; |
106 | 106 |
107 // Used in construction of DirectoryTypeDebugInfoEmitters. | 107 // Used in construction of DirectoryTypeDebugInfoEmitters. |
108 ObserverList<TypeDebugInfoObserver> type_observers_; | 108 base::ObserverList<TypeDebugInfoObserver> type_observers_; |
109 | 109 |
110 private: | 110 private: |
111 base::MessageLoop loop_; // Neeed to initialize the directory. | 111 base::MessageLoop loop_; // Neeed to initialize the directory. |
112 TestDirectorySetterUpper dir_maker_; | 112 TestDirectorySetterUpper dir_maker_; |
113 }; | 113 }; |
114 | 114 |
115 // Verify that the DirectoryCommitContribution contains only entries of its | 115 // Verify that the DirectoryCommitContribution contains only entries of its |
116 // specified type. | 116 // specified type. |
117 TEST_F(DirectoryCommitContributionTest, GatherByTypes) { | 117 TEST_F(DirectoryCommitContributionTest, GatherByTypes) { |
118 int64 pref1; | 118 int64 pref1; |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 EXPECT_FALSE(a3.GetId().ServerKnows()); | 502 EXPECT_FALSE(a3.GetId().ServerKnows()); |
503 EXPECT_FALSE(a3.GetSyncing()); | 503 EXPECT_FALSE(a3.GetSyncing()); |
504 EXPECT_FALSE(a3.GetDirtySync()); | 504 EXPECT_FALSE(a3.GetDirtySync()); |
505 EXPECT_EQ(0, a3.GetServerVersion()); | 505 EXPECT_EQ(0, a3.GetServerVersion()); |
506 } | 506 } |
507 | 507 |
508 art_cc->CleanUp(); | 508 art_cc->CleanUp(); |
509 } | 509 } |
510 | 510 |
511 } // namespace syncer | 511 } // namespace syncer |
OLD | NEW |