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

Side by Side Diff: sync/engine/sync_scheduler_unittest.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/engine/sync_scheduler.cc ('k') | sync/engine/sync_scheduler_whitebox_unittest.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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 virtual void SetUp() { 87 virtual void SetUp() {
88 dir_maker_.SetUp(); 88 dir_maker_.SetUp();
89 syncer_ = new MockSyncer(); 89 syncer_ = new MockSyncer();
90 delay_ = NULL; 90 delay_ = NULL;
91 91
92 ModelSafeRoutingInfo routing_info; 92 ModelSafeRoutingInfo routing_info;
93 routing_info[syncable::BOOKMARKS] = GROUP_UI; 93 routing_info[syncable::BOOKMARKS] = GROUP_UI;
94 routing_info[syncable::AUTOFILL] = GROUP_DB; 94 routing_info[syncable::AUTOFILL] = GROUP_DB;
95 routing_info[syncable::THEMES] = GROUP_UI; 95 routing_info[syncable::THEMES] = GROUP_UI;
96 routing_info[syncable::NIGORI] = GROUP_PASSIVE; 96 routing_info[syncable::NIGORI] = GROUP_CONTROL;
97 97
98 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_UI))); 98 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_UI)));
99 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_DB))); 99 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_DB)));
100 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE))); 100 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE)));
101 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_CONTROL)));
101 102
102 std::vector<ModelSafeWorker*> workers; 103 std::vector<ModelSafeWorker*> workers;
103 for (std::vector<scoped_refptr<FakeModelWorker> >::iterator it = 104 for (std::vector<scoped_refptr<FakeModelWorker> >::iterator it =
104 workers_.begin(); it != workers_.end(); ++it) { 105 workers_.begin(); it != workers_.end(); ++it) {
105 workers.push_back(it->get()); 106 workers.push_back(it->get());
106 } 107 }
107 108
108 connection_.reset(new MockConnectionManager(directory())); 109 connection_.reset(new MockConnectionManager(directory()));
109 connection_->SetServerReachable(); 110 connection_->SetServerReachable();
110 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); 111 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL));
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 PumpLoop(); 1135 PumpLoop();
1135 // Pump again to run job. 1136 // Pump again to run job.
1136 PumpLoop(); 1137 PumpLoop();
1137 1138
1138 StopSyncScheduler(); 1139 StopSyncScheduler();
1139 1140
1140 EXPECT_TRUE(expected == context()->previous_session_routing_info()); 1141 EXPECT_TRUE(expected == context()->previous_session_routing_info());
1141 } 1142 }
1142 1143
1143 } // namespace csync 1144 } // namespace csync
OLDNEW
« no previous file with comments | « sync/engine/sync_scheduler.cc ('k') | sync/engine/sync_scheduler_whitebox_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698