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

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

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/test/engine/syncer_command_test.h ('k') | sync/test/test_entry_factory.h » ('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 #include "sync/test/engine/syncer_command_test.h" 5 #include "sync/test/engine/syncer_command_test.h"
6 6
7 namespace csync { 7 namespace csync {
8 8
9 const unsigned int kMaxMessages = 10; 9 const unsigned int kMaxMessages = 10;
10 const unsigned int kMaxMessageSize = 5 * 1024; 10 const unsigned int kMaxMessageSize = 5 * 1024;
11 11
12 SyncerCommandTestBase::SyncerCommandTestBase() 12 SyncerCommandTestBase::SyncerCommandTestBase()
13 : traffic_recorder_(kMaxMessages, kMaxMessageSize) { 13 : traffic_recorder_(kMaxMessages, kMaxMessageSize) {
14 } 14 }
15 15
16 SyncerCommandTestBase::~SyncerCommandTestBase() { 16 SyncerCommandTestBase::~SyncerCommandTestBase() {
17 } 17 }
18 18
19 void SyncerCommandTestBase::SetUp() { 19 void SyncerCommandTestBase::SetUp() {
20 ResetContext(); 20 ResetContext();
21 // The session always expects there to be a passive worker. 21 // The session always expects there to be a passive worker.
22 workers()->push_back( 22 workers()->push_back(
23 make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE))); 23 make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE)));
24 workers()->push_back( // FIXME comment
25 make_scoped_refptr(new FakeModelWorker(GROUP_CONTROL)));
24 } 26 }
25 27
26 void SyncerCommandTestBase::TearDown() { 28 void SyncerCommandTestBase::TearDown() {
27 } 29 }
28 30
29 Directory* SyncerCommandTest::directory() { 31 Directory* SyncerCommandTest::directory() {
30 return dir_maker_.directory(); 32 return dir_maker_.directory();
31 } 33 }
32 34
33 void SyncerCommandTest::SetUp() { 35 void SyncerCommandTest::SetUp() {
(...skipping 15 matching lines...) Expand all
49 :mock_directory_(&handler_) { 51 :mock_directory_(&handler_) {
50 } 52 }
51 53
52 MockDirectorySyncerCommandTest::~MockDirectorySyncerCommandTest() { 54 MockDirectorySyncerCommandTest::~MockDirectorySyncerCommandTest() {
53 } 55 }
54 56
55 void MockDirectorySyncerCommandTest::SetUp() { 57 void MockDirectorySyncerCommandTest::SetUp() {
56 // The session always expects there to be a passive worker. 58 // The session always expects there to be a passive worker.
57 workers()->push_back( 59 workers()->push_back(
58 make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE))); 60 make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE)));
61 workers()->push_back(
62 make_scoped_refptr(new FakeModelWorker(GROUP_CONTROL)));
59 ResetContext(); 63 ResetContext();
60 } 64 }
61 65
62 Directory* MockDirectorySyncerCommandTest::directory() { 66 Directory* MockDirectorySyncerCommandTest::directory() {
63 return &mock_directory_; 67 return &mock_directory_;
64 } 68 }
65 69
66 } // namespace csync 70 } // namespace csync
OLDNEW
« no previous file with comments | « sync/test/engine/syncer_command_test.h ('k') | sync/test/test_entry_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698