Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: sync/test/engine/syncer_command_test.h

Issue 10825137: FYI: Control Data + Per-Device Metadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PER_USER_METADATA, refactor some encryption code Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ 5 #ifndef SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
6 #define SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ 6 #define SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 const ModelChangingSyncerCommand& command, 185 const ModelChangingSyncerCommand& command,
186 ModelSafeGroup group1, ModelSafeGroup group2, ModelSafeGroup group3) { 186 ModelSafeGroup group1, ModelSafeGroup group2, ModelSafeGroup group3) {
187 std::set<ModelSafeGroup> expected_groups_to_change; 187 std::set<ModelSafeGroup> expected_groups_to_change;
188 expected_groups_to_change.insert(group1); 188 expected_groups_to_change.insert(group1);
189 expected_groups_to_change.insert(group2); 189 expected_groups_to_change.insert(group2);
190 expected_groups_to_change.insert(group3); 190 expected_groups_to_change.insert(group3);
191 EXPECT_EQ(expected_groups_to_change, 191 EXPECT_EQ(expected_groups_to_change,
192 command.GetGroupsToChangeForTest(*session())); 192 command.GetGroupsToChangeForTest(*session()));
193 } 193 }
194 194
195 void ExpectGroupsToChange(
196 const ModelChangingSyncerCommand& command,
197 ModelSafeGroup group1, ModelSafeGroup group2,
198 ModelSafeGroup group3, ModelSafeGroup group4) {
199 std::set<ModelSafeGroup> expected_groups_to_change;
200 expected_groups_to_change.insert(group1);
201 expected_groups_to_change.insert(group2);
202 expected_groups_to_change.insert(group3);
203 expected_groups_to_change.insert(group4);
204 EXPECT_EQ(expected_groups_to_change,
205 command.GetGroupsToChangeForTest(*session()));
206 }
207
195 private: 208 private:
196 MessageLoop message_loop_; 209 MessageLoop message_loop_;
197 scoped_ptr<sessions::SyncSessionContext> context_; 210 scoped_ptr<sessions::SyncSessionContext> context_;
198 scoped_ptr<MockConnectionManager> mock_server_; 211 scoped_ptr<MockConnectionManager> mock_server_;
199 scoped_ptr<sessions::SyncSession> session_; 212 scoped_ptr<sessions::SyncSession> session_;
200 std::vector<scoped_refptr<ModelSafeWorker> > workers_; 213 std::vector<scoped_refptr<ModelSafeWorker> > workers_;
201 ModelSafeRoutingInfo routing_info_; 214 ModelSafeRoutingInfo routing_info_;
202 NiceMock<MockDebugInfoGetter> mock_debug_info_getter_; 215 NiceMock<MockDebugInfoGetter> mock_debug_info_getter_;
203 FakeExtensionsActivityMonitor extensions_activity_monitor_; 216 FakeExtensionsActivityMonitor extensions_activity_monitor_;
204 scoped_ptr<ThrottledDataTypeTracker> throttled_data_type_tracker_; 217 scoped_ptr<ThrottledDataTypeTracker> throttled_data_type_tracker_;
(...skipping 23 matching lines...) Expand all
228 241
229 virtual void SetUp() OVERRIDE; 242 virtual void SetUp() OVERRIDE;
230 243
231 TestUnrecoverableErrorHandler handler_; 244 TestUnrecoverableErrorHandler handler_;
232 syncable::MockDirectory mock_directory_; 245 syncable::MockDirectory mock_directory_;
233 }; 246 };
234 247
235 } // namespace syncer 248 } // namespace syncer
236 249
237 #endif // SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ 250 #endif // SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698