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

Side by Side Diff: sync/engine/sync_scheduler_whitebox_unittest.cc

Issue 10804039: Make SyncBackendRegistrar aware of loaded data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 #include "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/time.h" 6 #include "base/time.h"
7 #include "sync/engine/sync_scheduler.h" 7 #include "sync/engine/sync_scheduler.h"
8 #include "sync/engine/throttled_data_type_tracker.h" 8 #include "sync/engine/throttled_data_type_tracker.h"
9 #include "sync/sessions/sync_session_context.h" 9 #include "sync/sessions/sync_session_context.h"
10 #include "sync/sessions/test_util.h" 10 #include "sync/sessions/test_util.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 for (std::vector<scoped_refptr<FakeModelWorker> >::iterator it = 42 for (std::vector<scoped_refptr<FakeModelWorker> >::iterator it =
43 workers_.begin(); it != workers_.end(); ++it) { 43 workers_.begin(); it != workers_.end(); ++it) {
44 workers.push_back(it->get()); 44 workers.push_back(it->get());
45 } 45 }
46 46
47 connection_.reset(new MockConnectionManager(NULL)); 47 connection_.reset(new MockConnectionManager(NULL));
48 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); 48 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL));
49 context_.reset( 49 context_.reset(
50 new SyncSessionContext( 50 new SyncSessionContext(
51 connection_.get(), dir_maker_.directory(), 51 connection_.get(), dir_maker_.directory(),
52 routes, workers, &extensions_activity_monitor_, 52 workers, &extensions_activity_monitor_,
53 throttled_data_type_tracker_.get(), 53 throttled_data_type_tracker_.get(),
54 std::vector<SyncEngineEventListener*>(), NULL, NULL)); 54 std::vector<SyncEngineEventListener*>(), NULL, NULL));
55 context_->set_notifications_enabled(true); 55 context_->set_notifications_enabled(true);
56 context_->set_account_name("Test"); 56 context_->set_account_name("Test");
57 scheduler_.reset( 57 scheduler_.reset(
58 new SyncScheduler("TestSyncSchedulerWhitebox", context(), syncer)); 58 new SyncScheduler("TestSyncSchedulerWhitebox", context(), syncer));
59 } 59 }
60 60
61 virtual void TearDown() { 61 virtual void TearDown() {
62 scheduler_.reset(); 62 scheduler_.reset();
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 struct SyncScheduler::SyncSessionJob job; 261 struct SyncScheduler::SyncSessionJob job;
262 job.purpose = SyncScheduler::SyncSessionJob::CONFIGURATION; 262 job.purpose = SyncScheduler::SyncSessionJob::CONFIGURATION;
263 job.scheduled_start = TimeTicks::Now(); 263 job.scheduled_start = TimeTicks::Now();
264 job.is_canary_job = true; 264 job.is_canary_job = true;
265 SyncScheduler::JobProcessDecision decision = DecideOnJob(job); 265 SyncScheduler::JobProcessDecision decision = DecideOnJob(job);
266 266
267 EXPECT_EQ(decision, SyncScheduler::CONTINUE); 267 EXPECT_EQ(decision, SyncScheduler::CONTINUE);
268 } 268 }
269 269
270 } // namespace syncer 270 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698