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

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

Issue 10559104: sync: Process 'control' data separately (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename, cleanup, fix tests Created 8 years, 6 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
« no previous file with comments | « sync/syncable/model_type.cc ('k') | sync/test/engine/syncer_command_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 const ModelChangingSyncerCommand& command, 186 const ModelChangingSyncerCommand& command,
187 ModelSafeGroup group1, ModelSafeGroup group2, ModelSafeGroup group3) { 187 ModelSafeGroup group1, ModelSafeGroup group2, ModelSafeGroup group3) {
188 std::set<ModelSafeGroup> expected_groups_to_change; 188 std::set<ModelSafeGroup> expected_groups_to_change;
189 expected_groups_to_change.insert(group1); 189 expected_groups_to_change.insert(group1);
190 expected_groups_to_change.insert(group2); 190 expected_groups_to_change.insert(group2);
191 expected_groups_to_change.insert(group3); 191 expected_groups_to_change.insert(group3);
192 EXPECT_EQ(expected_groups_to_change, 192 EXPECT_EQ(expected_groups_to_change,
193 command.GetGroupsToChangeForTest(*session())); 193 command.GetGroupsToChangeForTest(*session()));
194 } 194 }
195 195
196 void ExpectGroupsToChange(
197 const ModelChangingSyncerCommand& command,
198 ModelSafeGroup group1, ModelSafeGroup group2,
199 ModelSafeGroup group3, ModelSafeGroup group4) {
200 std::set<ModelSafeGroup> expected_groups_to_change;
201 expected_groups_to_change.insert(group1);
202 expected_groups_to_change.insert(group2);
203 expected_groups_to_change.insert(group3);
204 expected_groups_to_change.insert(group4);
205 EXPECT_EQ(expected_groups_to_change,
206 command.GetGroupsToChangeForTest(*session()));
207 }
208
196 private: 209 private:
197 MessageLoop message_loop_; 210 MessageLoop message_loop_;
198 scoped_ptr<sessions::SyncSessionContext> context_; 211 scoped_ptr<sessions::SyncSessionContext> context_;
199 scoped_ptr<MockConnectionManager> mock_server_; 212 scoped_ptr<MockConnectionManager> mock_server_;
200 scoped_ptr<sessions::SyncSession> session_; 213 scoped_ptr<sessions::SyncSession> session_;
201 std::vector<scoped_refptr<ModelSafeWorker> > workers_; 214 std::vector<scoped_refptr<ModelSafeWorker> > workers_;
202 ModelSafeRoutingInfo routing_info_; 215 ModelSafeRoutingInfo routing_info_;
203 NiceMock<MockDebugInfoGetter> mock_debug_info_getter_; 216 NiceMock<MockDebugInfoGetter> mock_debug_info_getter_;
204 FakeExtensionsActivityMonitor extensions_activity_monitor_; 217 FakeExtensionsActivityMonitor extensions_activity_monitor_;
205 scoped_ptr<ThrottledDataTypeTracker> throttled_data_type_tracker_; 218 scoped_ptr<ThrottledDataTypeTracker> throttled_data_type_tracker_;
(...skipping 23 matching lines...) Expand all
229 242
230 virtual void SetUp() OVERRIDE; 243 virtual void SetUp() OVERRIDE;
231 244
232 TestUnrecoverableErrorHandler handler_; 245 TestUnrecoverableErrorHandler handler_;
233 MockDirectory mock_directory_; 246 MockDirectory mock_directory_;
234 }; 247 };
235 248
236 } // namespace csync 249 } // namespace csync
237 250
238 #endif // SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ 251 #endif // SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
OLDNEW
« no previous file with comments | « sync/syncable/model_type.cc ('k') | sync/test/engine/syncer_command_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698